greasemonkey

How to Transfer All Greasemonkey userscripts to Tampermonkey on Firefox 57+

只愿长相守 提交于 2019-11-28 23:43:29
After read that Greasemonkey recommends users to install Tampermonkey or Violentmonkey . I've installed Tampermonkey and now I'm trying to transfer all my Greasemonkey 3.x scripts to be opened on Tampermonkey, but I can't find it's location or even how to do it. I've read this question that says where and how it's located on Chrome , but where is it on Firefox 57+? How can I transfer it? PS: I'm expecting I won't need to update every userscript I have. Based on derjanb comment I'm answering the question showing the steps I took to achieve the transfer of the userscripts. Enter about:support on

Run Greasemonkey on html files located on the local filesystem?

拥有回忆 提交于 2019-11-28 22:19:15
问题 I have an API documentation lying around on my Harddrive and to ease my workflow, I have written a simple script that modifies the page for my needs. I've developed it using FireBug on FireFox. @include -ing webpages works correctly, but Greasemonkey does not seem to detect pages on the local file-system? I would like to have an include like // @include *R13/Python*R13/* Which should match for example file:///Z:/Eigene%20Dateien/Cinema4D/Documentations/R13/Python%20R13/modules/c4d/index.html

Greasemonkey, overriding website functions

痴心易碎 提交于 2019-11-28 22:00:53
i've been reading a lot and have been trying to get this done for about 5 hours now... so here it is I want to write a script that will override a function dummy() {$.ajax(...)}; on a website. here is how i'm trying to do it unsafeWindow.dummy = function(data){differantFunction(); $.ajax(...);}; function differantFunction(){ ... } but the dummy function that would have been called up to do something on the original page... now just does nothing. //update I tried running that function i'm trying to override trough the adres bar to see what's wrong: (javascript:dummy("..");) and I get an error

Replace jQuery version of a page with Greasemonkey

跟風遠走 提交于 2019-11-28 21:48:23
问题 How can i replace jquery version of a page with greasemonkey? Im trying to test a site with a newer version of jquery but i dont have a dev enviroment. 回答1: I know you're asking about jQuery and Greasemonkey for doing this, but let me off a completely different alternative, Fiddler. If you're testing a site out with a new version of jQuery and you actually want to test any breaking changes, etc...you want to test the site as it will be , whereas a JavaScript (greasemonkey)-based after-the

Get subdomain and load it to url with greasemonkey

坚强是说给别人听的谎言 提交于 2019-11-28 20:59:56
问题 I am having the URL http://somesubdomain.domain.com (subdomains may vary, domain is always the same). Need to take subdomain and reload the page with something like domain.com/some/path/here/somesubdomain using greasemonkey (or open a new window with URL domain.com/some/path/here/somesubdomain, whatever). 回答1: var full = window.location.host //window.location.host is subdomain.domain.com var parts = full.split('.') var sub = parts[0] var domain = parts[1] var type = parts[2] //sub is

Unique element ID, even if element doesn't have one

荒凉一梦 提交于 2019-11-28 20:12:43
I'm writing a GreaseMonkey script where I'm iterating through a bunch of elements. For each element, I need a string ID that I can use to reference that element later. The element itself doesn't have an id attribute, and I can't modify the original document to give it one (although I can make DOM changes in my script). I can't store the references in my script because when I need them, the GreaseMonkey script itself will have gone out of scope. Is there some way to get at an "internal" ID that the browser uses, for example? A Firefox-only solution is fine; a cross-browser solution that could

How to automatically click a confirm box?

£可爱£侵袭症+ 提交于 2019-11-28 19:47:52
My script clicks an image on a site. The image has an anchor href and an onclick href , but the onclick href has a confirm box that pops up once it's clicked. The onclick HTML is: onClick="this.href='link2';if (!confirm('Are you sure?')) { return false; } How do I get the script to click OK in that confirm box, once it pops up? I'm using this function to click the picture link: function click(elm) { var evt = document.createEvent('MouseEvents'); evt.initMouseEvent('click', true, true, window, 0, 1, 1, 1, 1, false, false, false, false, 0, null); elm.dispatchEvent(evt); } click(picture element)

GreaseMonkey script to auto login using HTTP authentication

假装没事ソ 提交于 2019-11-28 19:01:30
I've got quite a few GreaseMonkey scripts that I wrote at my work which automatically log me into the internal sites we have here. I've managed to write a script for nearly each one of these sites except for our time sheet application, which uses HTTP authentication. Is there a way I can use GreaseMonkey to log me into this site automatically? Edit: I am aware of the store password functionality in browsers, but my scripts go a step further by checking if I'm logged into the site when it loads (by traversing HTML) and then submitting a post to the login page. This removes the step of having to

can i remove the X-Requested-With header from ajax requests?

旧巷老猫 提交于 2019-11-28 18:43:14
I wanted to know if anyone has had experience with trying to remove the 'X-Requested-With' header from the ajax request made by jquery (or plain JS). is it possible? 2nd part: do you know if Grease Monkey's ajax requests set this header? Thanks header looks like this: X-Requested-With XMLHttpRequest "2nd part: do you know if Grease Monkey's ajax requests set this header?" No, Greasemonkey's GM_xmlhttpRequest() does not set this header (although you can certainly add it). The default request issued by GM_xmlhttpRequest() looks just like a normal browser request. For example: GM_xmlhttpRequest (

How/Where to store data in a Chrome Tampermonkey script?

三世轮回 提交于 2019-11-28 18:39:17
I wrote one Greasemonkey/Tampermonkey script for Facebook . I needed to store data to retrieve it later. For that I used localStorage . That was working fine. But I noticed that after few hours all data which I stored was removed automagicllay. Probably Facebook itself deletes all localStorage data. Now, I searched for alternatives. Cookies : No this will be removed when user clears history. Web SQL : Apparently it is dropped by w3.org. So in near future I assume chrome might not be using web sql too. I want to store the data in client system. What option do I have? Should I use FileSystem to