tampermonkey

Adding a custom keyboard shortcut using userscript to Chrome with Tampermonkey

為{幸葍}努か 提交于 2020-01-12 20:19:16
问题 I would like to add some custom keyboard shortcuts to a certain web page. Using the accepted answer from this question as a guide: How can I add a JavaScript keyboard shortcut to an existing JavaScript Function? I made my own little function and added a listener: // ==UserScript== // @name ChartGame // @namespace http://www.chartgame.com/ // @version 0.1 // @description enter something useful // @match http://www.chartgame.com/play* // @copyright 2012+, You // ==/UserScript== function doc

Why is usage of the downloadURL & updateURL keys called unusual and how do they work?

倾然丶 夕夏残阳落幕 提交于 2020-01-09 06:22:19
问题 I was reading GM's wiki to determine the difference between @downloadURL & @updateURL (which I didn't). But what confused me even more that both are unadvised: It is unusual to specify this value. Most scripts should omit it. I'm surprised by that as it's the only way for scripts to auto-update and I don't see why these keys shouldn't be used. The wiki itself is pretty lacking and no other forum sources are advised, so I have to ask here. Also would appreciate more detailed info on these keys

Why is usage of the downloadURL & updateURL keys called unusual and how do they work?

自作多情 提交于 2020-01-09 06:20:28
问题 I was reading GM's wiki to determine the difference between @downloadURL & @updateURL (which I didn't). But what confused me even more that both are unadvised: It is unusual to specify this value. Most scripts should omit it. I'm surprised by that as it's the only way for scripts to auto-update and I don't see why these keys shouldn't be used. The wiki itself is pretty lacking and no other forum sources are advised, so I have to ask here. Also would appreciate more detailed info on these keys

How to hide table rows containing certain keywords? [closed]

笑着哭i 提交于 2020-01-07 05:29:09
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 4 years ago . When reading forums, I'd like to be able to have customizable keyword filters to hide certain rows. For example on this forum, I'd like to hide any rows for certain usernames (3rd column). Is it difficult to write a Greasemonkey script that could do this, only on this site? Or is

Reopen Dexie Database with Tampermonkey

扶醉桌前 提交于 2020-01-06 10:04:12
问题 As per my previous post, I was referred to create a new post. As seen in the comments, there is a trail of progression for the issue, I'll rephrase here in this post: I'm using a TamperMonkey script in FireFox. I'm trying to persist a Dexie object/database into TamperMonkey's local storage with GM.setValue('unique-dexie-db-name', dexieDBvariable); However when I go to retrieve this value (ex. I store this on google.com, and retrieve this on yahoo.com) with var dexieDB = GM.getValue('unique

Detect react event from Tampermonkey

筅森魡賤 提交于 2020-01-06 08:11:15
问题 I'm enhancing a React front end with Tampermonkey , by adding highlights to show cursor location in a grid, and allowing users to directly enter data , rather than then enter data. After 2 or 3 cursor moves or data entry the grid refreshes or updates - no page change - and looses the highlighting I set up. I'd like to catch the refresh/update and reset the highlighting. I'm a noob.. The network tab shows post events so I tried https://jsbin.com/dixelocazo/edit?js,console var open = window

What is Greasemonkey/Tampermonkey doing to my jQuery object when I use GM_setValue?

萝らか妹 提交于 2020-01-05 09:14:02
问题 I'm trying to select DOM elements into a Tampermonkey variable using GM_setValue , for later injection on different pages. I've created an example where I can do this in normal jQuery using .clone() , but when I set it as a value in Tampermonkey, it changes the value of the saved variable. Here's an HTML page to test the script on: <!DOCTYPE html> <html><head> <script data-require="jquery@*" data-semver="3.0.0" src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.0.0/jquery.js"></script>

Button click doesn't work in Greasemonkey/Tampermonkey script. Already tried standard mouse events with waitForKeyElements()

女生的网名这么多〃 提交于 2020-01-05 09:05:21
问题 I'm trying to click the "Mehr Laden" Button on the URL http://www.sparhandy.de/handy-kaufen/ with Tampermonkey. The Button is located underneath the Smartphone pictures. Here is the script that I wrote so far: // ==UserScript== // @name SparhandyScript // @namespace http://tampermonkey.net/ // @version 0.1 // @description try to take over the world! // @author Nigel // @match http://www.sparhandy.de/handy-kaufen/ // @require http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js //

How to check for 403 and 404 errors when changing the url of a resource?

时光总嘲笑我的痴心妄想 提交于 2020-01-03 17:11:21
问题 I am making a userscript for the TamperMonkey Chrome extension (it is the same than making a userscript for GreaseMonkey). In my script, I am iterating over some document external resources (img, css, links, scripts) via document.getElementsByTagName() and I am changing their src or href attributes to another url. For the majority of cases, the new url is loading properly but in some cases, it ends on a 404 or 403 error from my proxy. Could you give me some pointers about how to handle (if

Firefox doesn't respect Object.defineProperty() from a Greasemonkey script?

牧云@^-^@ 提交于 2020-01-03 05:35:29
问题 I'm writing a userscript to prevent a website to set document.body.innerHTML , this is a typical sign of a website detecting adblock: (function() { 'use strict'; console.log("Loading ..."); Object.defineProperty(document.body, "innerHTML", { set: function() { console.log("malicious activity detected"); throw "Don't try to fool my adblock!"; } }); console.log("Test setting document.body ..."); try { document.body.innerHTML = ""; } catch (e) { console.log(e); } }) (); The above userscript works