tampermonkey

How to change the name field of an <input> in an AJAX-driven page?

血红的双手。 提交于 2019-11-29 16:48:14
For this target page (Sorry but SO doesn't allow hyperlinks to 62.0.54.118): http://62.0.54.118/search?&q=42&oq=42&sourceid=chrome&ie=UTF-8&filter=0 , I want to change the name field of an <input> by default with a userscript. The input is: <input class="gsfi" id="lst-ib" name="q" maxlength="2048" value="42"...> I want to change it to: <input class="gsfi" id="lst-ib" name="&q" maxlength="2048" value="42"...> That is, I Want to change the q into &q in the name field of the input by default. I try to write a script, (that doesn't work): // ==UserScript== // @name Normal Google Input // @include

tampermonkey script stops working if I change the page

巧了我就是萌 提交于 2019-11-29 16:14:50
I am using Tampermonkey to save time on frequent tasks. The goal is to get content of an element on www.example1.com, navigate to another page, and do stuff there. The starting page is www.example1.com as seen from match . This is the code I am using: //@match http://example1.com var item = document.getElementById("myId").textContent; window.open("http://example2.com","_self"); setTimeOut(function( //perform clicks on this page ){},3000); None of the code after changing URLs ever gets executed. Why, and what is the workaround? wOxxOm Allow the userscript on both urls and use GM_setValue / GM

@require-ing jQuery overwrites the page's $ variable

自古美人都是妖i 提交于 2019-11-29 11:36:40
I'm @require -ing jQuery for my Greasemonkey script with this line in my script file: // @require https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js and it works quite well; I can use $('#id') to access the DOM. However, the $ variable of the 'real' page is modified (where $ is jQuery 1.2.xx): I get an error that $.include is not defined. I thought the sandbox model of Greasemonkey would prevent that the variables of the target-page are overwritten? How can I ensure that the inclusion of javascript libraries does not affect the 'real' website, but only my Greasemonkey script?

Why isn't my Greasemonkey script updating?

眉间皱痕 提交于 2019-11-29 11:14:53
问题 I've got a Greasemonkey script for Firefox. The script includes this meta-block and some lines of code. I want to update my script on the server and then automatically update the browser's scripts. The requireSecureUpdates option is off. What am I doing wrong? My 1.meta.js // ==UserScript== // @name Ibood autosubmit // @include https://*.ibood.com/* // @include http://*.ibood.com/* // @include * // @version 1.1 // @require http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js //

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

How to edit Tampermonkey scripts outside of the browser

本小妞迷上赌 提交于 2019-11-28 21:17:54
问题 How do I edit Tampermonkey scripts outside of the browser? Would rather be in a good IDE instead of trying to make the edits in the browser. I used to be able to do this when I developed Greasemonkey scripts in Firefox, but I can't locate the .user.js files with Chrome. 回答1: Since Chrome extensions don't really (explanation below) have access to the filesystem Tampermonkey stores the scripts at an internal storage. What you can do is to allow Tampermonkey to access your local files, copy the

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

Basic method to Add html content to the page with Greasemonkey?

烈酒焚心 提交于 2019-11-28 18:26:06
Is there a Greasemonkey method to append basic HTML content to the end of a page right after the <body> tag, or right before it ends? I found before/after methods but I need to know names of elements which may change page to page.. The quick and dirty way: Please only use innerHTML for brand- new content. var newHTML = document.createElement ('div'); newHTML.innerHTML = ' \ <div id="gmSomeID"> \ <p>Some paragraph</p> \ etc. \ </div> \ '; document.body.appendChild (newHTML); A complete script showing the somewhat better jQuery way (and with new, ECMAScript 6, multiline string): // ==UserScript=

Where are Chrome/Tampermonkey userscripts stored on the filesystem? [closed]

空扰寡人 提交于 2019-11-28 18:14:10
Where are Chrome/Tampermonkey userscripts stored on the filesystem? I want to edit user scripts directly instead of using the hokey in-browser editor. Brock Adams Tampermonkey scripts are super easy to update via the Tampermonkey tab. See the Tampermonkey FAQ , or just try it. Tampermonkey scripts were stored in a special SQLite database and were/are not directly editable in file form. Update: As of version 3.5.3630 , Tampermonkey scripts are now stored using Chrome's extension storage. They are still not editable in file form, but the developer of Tampermonkey (derjanb) has helpfully made a

Trying to parse two SVG attributes at the same time

纵饮孤独 提交于 2019-11-28 14:41:58
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 stroke value in the request?? The Stroke value has to be in HEX format when it sends the request just like