Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8221165
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T13:48:38+00:00 2026-06-07T13:48:38+00:00

thats what i got so far function onReady(callback) { if (document.readyState === complete) window.setTimeout(callback,

  • 0

thats what i got so far

function onReady(callback) {
    if (document.readyState === "complete") window.setTimeout(callback, 0);
    else window.addEventListener("load", callback, false);
}
onReady(function() {
    removeit("new");
});

function removeit() {
    el = document.querySelector("#toolbarCurtain");
    if (el) {
        el.style.setProperty("display", "", null);
    } * * EXEC COMMAND
    return;
}

the ” **EXEC COMMAND” thing is where i want to call a function that is in the site itself. the function is called drawPlayer(), and when i type drawPlayer() in the chrome console it works. i can’t make my script call the function, how do i do that?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T13:48:40+00:00Added an answer on June 7, 2026 at 1:48 pm

    Taken from here.

    All injected code runs in an isolated world, a javascript context isolated from the main website’s JS context. This is a built-in security measure and cannot be disabled.

    The solution is to append a script. If you need a lot of executions, you should normally setup a custom communication event, and only inject one script listening to that custom event and eval()ing the event data. Here is how Google recommends to do this.

    Bear in mind this will only work if the target site doesn’t have CSP (Content-Security-Policy).

    var RunInThisContext = function(c){ 
        var code = document.createTextNode(c);
        var script = document.createElement('script');
        script.type='text/javascript';
        script.appendChild(code);
        document.body.appendChild(script);      
    }; 
    

    Use like this:

    RunInThisContext('('+(function(){ 
         /////////////////////
         //
         //   RUN YOUR FUNCTIONS HERE
         //
         /////////////////////
    }).toString()+'()); '); 
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This is what I've got so far: onMouseMove: function(event) { clearTimeout(ics.timeout); ics.timeout = setTimeout(function()
I have got this far with my coding: success: function(data) { $.each(data, function(item){ if
So I've got a save button on my form, which has a callback function
I have a double thats got a value of something like 0.50000 but I
Ive got a div thats hidden with .hide and on click opens using .show(slide,
I've got a neat question here. There's a utility called reg.exe thats been shipped
Here's what I've got so far: /** * Parse a duration between 2 date/times
This is what I got so far, and it's not working at all :(
I've got a CFC thats returning a query object in JSON format, looks like
im trying to get multi texturing working and have so far got miltiple textures

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.