chrome_plugins icon indicating copy to clipboard operation
chrome_plugins copied to clipboard

window access?

Open CyBrian opened this issue 8 years ago • 1 comments

Is there a way to access the page's window object so one can access the pages global JS variables

e.g. window.dataLayer

Or is this deliberately prevented by Chrome?

CyBrian avatar Oct 25 '18 06:10 CyBrian

@CyBrian you can access window for example, here is a script I've been using tonight.

setTimeout(fourtySecInterval, 1000);

function fourtySecInterval() {
  if (window.location.href.includes('marketplace')) {
    var a = setInterval(() => {
      window.location.href = window.location;
    }, 40000);   
  }
}

asarenski avatar Nov 27 '18 02:11 asarenski