greasemonkey

Can a userscript delete cookies from a given domain?

五迷三道 提交于 2019-12-18 05:57:45
问题 Can Greasemonkey delete cookies from a given domain? If so, how? 回答1: There are major limitations on what Greasemonkey can delete. Other tools may be better for what you want, see below. But, if all of these conditions are met: The cookies you want to delete are on the current page's domain. They are not "Secure cookies". You loop through the possible paths, including / , a blank path, etc. No cookies are set by javascript, after the page loads. The thing tracking you really is a "cookie".

Greasemonkey @require jQuery not working “Component not available”

拥有回忆 提交于 2019-12-18 04:07:06
问题 I've seen the other question on here about loading jQuery in a Greasemonkey. Having tried that method, with this require statement inside my ==UserScript== tags: // @require http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js I still get the following error message in Firefox's error console: Error: Component is not available Source File: file:///Users/greg/Library/Application%20Support/ Firefox/Profiles/xo9xhovo.default/gm_scripts/myscript/jquerymin.js Line: 36 This stops my

How to enable local javascript to read/write files on my PC?

亡梦爱人 提交于 2019-12-18 03:46:15
问题 Since Greasemonkey can't read/write files from a local hard disk, I've heard people suggesting Google gears but I've no idea about gears. So, I've decided to add a <script type="text/javascript" src="file:///c:/test.js">/script> Now, this test will use FileSystemObject to read/write file. Since, the file:///c:/test.js is a javascript file from local hard disk, it should probably be able to read/write file on my local hard disk. I tried it but Firefox prevented the file:///c:/test.js script to

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

霸气de小男生 提交于 2019-12-18 02:51:15
问题 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. 回答1: Based on derjanb comment I'm

Storing into file using JavaScript/GreaseMonkey

 ̄綄美尐妖づ 提交于 2019-12-17 23:25:57
问题 I have captured list of data from the page using Greasemonkey. GM Script var hit = GM_getValue("hit") || 0; var _url = "http://localhost:8080/test?p=$$pageNo$$"; _url = _url.replace("$$pageNo$$", hit); GM_setValue("hit", ++hit); if(hit <= 100) { window.location.href = _url; } This script will runs for nth time and capture <10K data, now i facing the issue in storing the captured data in some file. Anyone has any idea about how we can store the captured data into file/repo? Thanks -

GreaseMonkey script to auto login using HTTP authentication

℡╲_俬逩灬. 提交于 2019-12-17 22:38:11
问题 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

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

纵饮孤独 提交于 2019-12-17 22:20:39
问题 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.. 回答1: 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

How do I publish a Greasemonkey script as a Firefox add-on?

我的未来我决定 提交于 2019-12-17 21:57:10
问题 I recently have worked on a script in Greasemonkey and would like to publish it as an add-on for Firefox. What is the easiest way to do this? 回答1: Just post your script at userscripts.org 1 OpenUserJS.org (Or one of the other userscripts.org replacements). Trying to repackage it as an add-on is usually more trouble than it is worth. If you really must, you can use the Greasemonkey script compiler to turn your script into an "add-on", and then submit that add-on to Mozilla, via the normal add

Replace images source for all images

左心房为你撑大大i 提交于 2019-12-17 20:31:42
问题 I want to replace the src attribute for all images matching a regex using Greasemonkey scripting. Example: Replace http://aff.kooora.com/i/z3.gif With http://example.com/aff.kooora.com/i/z3.gif I have no experience in scripting but this is what I came up with: var allImg=document.getElementsByTagName("img"), i=0, img; var pattern = aff\.kooora\.com/([A-Za-z0-9/._]*); while(img=allImg[i++]) { result = pattern.exec(img); if (result!=null) img.src=img.src.replace(result, 'http://example.com/' +

How to hide certain elements using Greasemonkey?

别等时光非礼了梦想. 提交于 2019-12-17 19:56:13
问题 I'm looking to hide certain elements using Greasemonkey. Links like this: <a href="earn-google-circles.php" target="_blank" );"="">View</a> Or images like this: <img src="http://www.somesite.org/img/icon/earn-google-circles-435912.png" alt="Circle" title="Google Circle" height="18px" width="50px"> Of course, it's a part of a larger Div, but that div can't be hidden because it would hide other things I don't want hidden. So, is there any way to hide these elements using Greasemonkey? (Editor's