You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Can you please add a checkbox to run the code in the context of the page?
Here's how to do it:
// script tag to inject into the document
scr = document.createElement('script');
// set code as text (function automatically converted to text)
scr.textContent = '(' + function() {
console.log(jQuery); // for example here we can use the page's jQuery object
} + ')();'
console.log('injecting script tag:', scr); // may be required (or it won't be loaded in the page for some reason)
// insert the code in the page
(document.head || document.documentElement).appendChild(scr);
// optionally hide the script tag from the page (you could make it a checkbox too)
// scr.parentNode.removeChild(scr);
The text was updated successfully, but these errors were encountered:
Can you please add a checkbox to run the code in the context of the page?
Here's how to do it:
The text was updated successfully, but these errors were encountered: