samedi 24 février 2018

How to make Tempermonkey work in Goole pages

I want to make a script for Google pages like: chrome://apps/

But seems that Tempermonkey dont work in these pages. What should i do for the following script?

What im trying:

// ==UserScript==
// @name         Some Script
// @namespace    http://tampermonkey.net/
// @version      0
// @description  Trying to work in Google pages
// @author       You
// @match        *://*/*
// @grant        none
// ==/UserScript==

var myVar = 0;

if(window.location.href === "chrome://apps/"){ //check the URL
    if(myVar === 0){
        myVar++;
    alert("test");
    }
}




Aucun commentaire:

Enregistrer un commentaire