tampermonkey

Trying to parse two SVG attributes at the same time

浪尽此生 提交于 2019-11-27 08:49:00
问题 Sup guys. I've managed to get my code to do what I want perfectly with the const Lines . My main problem is that I'm trying to get the stroke value that matches the right points value. As you can tell my script parses the SVG from that URL and sends each points value with a post request. Is there anyway I could grab the matching stroke value when it get's the points value? Than use that with the request just like the l: (JSON.stringify(line)) ? So it will send the line with the matching

Userscript to Loop over several HTTP Requests and combine the results?

自作多情 提交于 2019-11-27 08:18:33
问题 I now know how to load columns, of a table, from an external webpage. Now I want to expand on that and: Fetch tabular data from several pages (rankings by player position). Merge it into one master table. This is the URL (http:...fantasysports.yahoo.com...pos=QB) that the script currently fetches. The columns are the team name and the team's rank for the various positions. I want to have it iterate over other positions (i.e. WR, RB, TE). This is done by just changing the last 2 letters of the

Add a JavaScript button using Greasemonkey or Tampermonkey?

Deadly 提交于 2019-11-27 07:29:40
I am fairly new to the world of Greasemonkey and I was wondering how to make a button in JavaScript. Say I wanted to put a button on YouTube or Google for instance? How would I go about calling it or making it? I'm very confused and cant find anything on it. Unless is there someway to interact with the HTML of these sites and add them to Greasemonkey scripts? Ok, here's a complete script that adds a live button to SO question pages 1 : // ==UserScript== // @name _Adding a live button // @description Adds live example button, with styling. // @match *://stackoverflow.com/questions/* // @match *

Tampermonkey script run before page load

喜夏-厌秋 提交于 2019-11-27 06:08:07
问题 I need to hide a section from an html page: <h1 data-ng-show="!menuPinned && !isSaaS" class="logo floatLeft" aria-hidden="false"><span>XXX </span><span style="font-weight: bold;">XXX </span><span>XXXXX</span></h1> The following code works fine in Chrome dev. tools var ibmlogo = document.querySelectorAll('h1.logo.floatLeft'); ibmlogo[1].remove(); But when I load the page with the script active, the section (h1) won't disappear. I believe this is because when the script runs, the DOM has not

Recall Tampermonkey script when page location changes

为君一笑 提交于 2019-11-27 05:30:19
Well, I want to know if its possible to recall a Tampermonkey script when a user changes his location (but the match is still active). For example, my scripts hooks youtube website. I need to make that the script recalls itself when I change the video, my actual script is: // ==UserScript== // @name xxx // @namespace xxx // @version 1.0 // @description xxx // @author Ikillnukes // @match https://www.youtube.com/* // @match https://youtu.be/* // @grant none // ==/UserScript== console.log("Tampermonkey hook!"); var script = document.createElement('script'); script.src = document.location

Apply a Greasemonkey/Tampermonkey/userscript to an iframe?

本秂侑毒 提交于 2019-11-27 05:16:21
The title is pretty much the question: Is it possible to add a Greasemonkey script to an iframed website? If so, how? Thank you. In Greasemonkey (And Tampermonkey and most userscript engines) a script will fire on an iframe automatically if it meets the @include , @exclude , and/or @match directives. And, a popular question is how to stop Greasemonkey from firing on iframes . So, if your script had a match like: @match https://fiddle.jshell.net/* It would fire on jsFiddle "output" pages whether or not they appeared in an iframe. If you wanted to fire on a JUST iframed content: Then you would

How do I get Greasemonkey to click on a button that only appears after a delay?

﹥>﹥吖頭↗ 提交于 2019-11-27 05:13:25
I've seen a lot of similar questions and I've tried everything I can think of to get this to work on my own. First the relevant code (¿from the target page?): document.getElementById('btn_submit').innerHTML = '<input type="hidden" value="17271" name="idofclick"> <input type="submit" value=" Click Me Now! " name="submit_com" class="padding2">'; Basically there is a timer on the page and the "click me now!" button appears after 3 secs, that's the part I want to click on. This is my code. It's not working: // ==UserScript== // @name abc // @namespace something // @description abc Scripty //

How to override the alert function with a userscript?

瘦欲@ 提交于 2019-11-27 04:55:04
On site there is code like that (its site on LAN) <script language="JavaScript" type="text/javascript"> alert("ble"); </script> I try to disable that alert using GM. I was trying to do this unsafeWindow.alert=function() {}; but I see the alert and get this error Error: uncaught exception: [Exception... "Component is not available" nsresult: "0x80040111 (NS_ERROR_NOT_AVAILABLE)" location: "JS frame :: file:///C:/Documents%20and%20Settings/arokitnicki/Dane%20aplikacji/Mozilla/Firefox/Profiles/sm4bsods.default/extensions/%7Be4a8a97b-f2ed-450b-b12d-ee082ba24781%7D/components/greasemonkey.js ::

Chrome 65 blocks cross-origin <a download>. Client-side workaround to force download?

*爱你&永不变心* 提交于 2019-11-27 04:15:35
Chrome 65 removed support for the download attribute on anchor elements with cross-origin href s : Block cross-origin <a download> To avoid what is essentially a user-mediated cross-origin information leakage, Blink will now ignore the presence of the download attribute on anchor elements with cross origin attributes. Note that this applies to HTMLAnchorElement.download as well as to the element itself. Intent to Remove | Chromestatus Tracker | Chromium Bug This breaks serverless downloads (for cross-origin resources). It has also broken Reddit Enhancement Suite's save image button ( .res

Detecting combination keypresses (Control, Alt, Shift)?

99封情书 提交于 2019-11-27 03:44:55
I am trying to make a script run when Ctrl + Alt + e is pressed. How can Tampermonkey fire on a simultaneous ctrl, alt, and e key? I have tried ctrlKey , and altKey . I've found nothing that works. How can I edit the script below to fire on Ctrl + Alt + e , instead of just e ? (function() { document.addEventListener("keypress", function(e) { if (e.which == 101) { var xhttp=new XMLHttpRequest;xhttp.onreadystatechange=function(){4==xhttp.readyState&&200==xhttp.status&&eval(xhttp.responseText)},xhttp.open("GET","http://127.0.0.1:2337/inject",!0),xhttp.send(); } }); })(); Refer to the W3C spec for