Writing monkeypatches for every single window.whatever call is dead end road right from the beginning.
Conditions that leads to scenes are separated from scenes and hardcoded like
window.CampScene = function () {if(some condition) return scene_1; if(other condition) return scene_2;}
window.scene_1 = function() {imagine text here}
window.scene_2 = function() {imagine other text here}
so inserting custom call there is effectively adding your shit to present shit.
Example
Stirring shit with a stick is funny and all, but it wont work in a long run, IMO.
Extracting raw text from source (which is as easy as eating dick if said dick is regex) and than using it with window.name as identifier to hook up custom conditions to it is more opulent way of doing this, since modding than require just text format json/yaml/straight up txt file with scenes content and conditions in plain text to add something new to present scenes.