Is it possible to make any script into a script that only runs on www.example.com, Only if the website is being accessed from an incognito window? (chrome)
Let's quickly summarize: Tampermonkey itself is neither safe nor unsafe; it's just a tool for managing user scripts. However, many user scripts can potentially be dangerous and contain malware. Other user scripts can be bad in the sense that they have unintended side effects, like bad CPU performance.
Extensions are not allowed to be enforced by the administrators in Incognito, whereas users can individually enable extensions in Incognito mode.
While Greasemonkey supports Firefox and some other open-source browsers, Tampermonkey supports all the major browsers including Firefox, Chrome, and Safari.
Bottom line, is for a "read only" userscript, that does not require global libraries in @grant none mode, the page cannot detect it.
I've added a isIncognito flag to Tampermonkey's GM_info. So you now can check the incognito mode like this:
// ==UserScript==
// @name testIncognito
// @namespace http://tampermonkey.net/
// @version 0.1
// @description enter something useful
// @match http://*/*
// @copyright 2012+, You
// ==/UserScript==
if (GM_info.isIncognito) {
alert([ GM_info.scriptHandler, 'detected incognito mode @', window.location.href ].join(' '));
}
Please not that this at the moment only is available at TM beta version 3.0.3353 and higher.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With