becraig
asked on
Chrome extension script injection
I need to figure out how to inject a script into a webpage via a Chrome extension.
I am able easily to use document.write / writeline but it seems to just sit there and do nothing I am sure I am doing something wrong and just too lazy to look for the right approach.
document.writeln('<Script> var prevent_bust = 0;window.onbeforeunload = function() {prevent_bust++}setInterva l(function () { if (prevent_bust > 0) {prevent_bust -= 2; window.top.location = "https://httpstat.us/204"}}, 1); </script>');
I am able easily to use document.write / writeline but it seems to just sit there and do nothing I am sure I am doing something wrong and just too lazy to look for the right approach.
document.writeln('<Script>
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.