greasemonkey

Add a frame to the bottom of a web page using a Greasemonkey script (and set its size)?

北慕城南 提交于 2019-12-11 05:05:01
问题 Is there any way to add a frame to the bottom of a web page using a Greasemonkey script? I want to write a script that adds http://www.google.com at the bottom of every web page, inside a frame. I also want the width and height of the frame to be the same as the height of the page that is inside it. 回答1: This is 3 questions in one. Adding an <iframe> is easy, by itself: $(document.body).append ( '<iframe src="http://{SOME_PAGE_BESIDES_GOOGLE!}.com/">' ); But, Google will not let you load it

What are the differences between Fx 3.x and Fx 4.x that made many userscripts stop working?

夙愿已清 提交于 2019-12-11 04:49:05
问题 I develop scripts for userscripts.org and just upgraded my fx from 3.6.16 to 4.0, but many scripts of mine stopped working with the following message error: Error: Component returned failure code: 0x8007000e (NS_ERROR_OUT_OF_MEMORY) [nsIXPCComponents_Utils.evalInSandbox] Source code: file:///xxx.user.js I know this message means some kind of "infinite" process, but it doesn't appear any line number that can help me to figure it out. Any help/answer/link is welcome. Operating System: Windows 7

jQuery: .parent() wont hide if numerical range begins at 0

江枫思渺然 提交于 2019-12-11 04:24:18
问题 I am having some issues with using a numerical range detection within an element, to then hide another element. It seems to work fine when the range starts at 1+, but it breaks at 0+. Their are different iterations of code I have tried, but so far no luck. This is the website I am trying to use my greasemonkey script on: https://openuserjs.org/?orderBy=updated&orderDir=desc The purpose: I would like to hide a listed item, if it has 0-100 installs. Here is my script: https://ghostbin.com/paste

Need to click a bid button with Grease monkey script

青春壹個敷衍的年華 提交于 2019-12-11 03:59:49
问题 I'm a bit stuck. I'm trying to create an Grease Monkey script that will automatically click an pop-up that appears on an auction site. I'v got the Xpat, but i'm too in expierienced with GM to get it to work. Here is theelement inspection line i get from fire finder for firebug: <input type="submit" style="width: 160px;" class="simplemodal-close" id="ctl00_mainContentPlaceholder_Button3" onclick="closePopup(); return false;" value="Back To Auctions" name="ctl00$mainContentPlaceholder$Button3">

Pandora ajax not working with waitForKeyElements

别等时光非礼了梦想. 提交于 2019-12-11 03:33:53
问题 Pandora AJAX is not working with waitForKeyElements. I have spent a few hours trying to see where I went wrong and can't work it out. It works once but doesn't work when the next track is played. // ==UserScript== // @name Pandora I am listening to // @namespace http://tampermonkey.net/ // @version 0.1 // @description Pandora I am listening to // @author You // @match http*://www.pandora.com/* // @include https://www.pandora.com/station/play/* // @require https://gist.githubusercontent.com

Component returned failure code: 0x80004005

柔情痞子 提交于 2019-12-11 03:04:07
问题 This error triggers only sometimes when I do an XMLHttpRequest . uncaught exception: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIXMLHttpRequest.setRequestHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: file://.../Mozilla/Firefox/Profiles/.../extensions/.../components/greasemonkey.js :: anonymous :: line 1332" data: no How can I fix it? 来源: https://stackoverflow.com/questions/2743147/component-returned-failure-code-0x80004005

setTimeout takes longer than it should

喜夏-厌秋 提交于 2019-12-11 02:29:04
问题 Could someone please explain why the script, below with the setTimeout command, takes a lot longer to execute (400-500 ms) in Greasemonkey than it does in the Firefox console, where it's exactly 100 ms? var start = new Date ().getTime (); console.log ( new Date ().getHours ()+" : " + new Date ().getMinutes () + " : " + new Date ().getSeconds () + " : " + new Date ().getMilliseconds () ); setTimeout (foo,100); //foo (); function foo () { var time = new Date () - start; console.log ("Execution

How to debug Greasemonkey/Tampermonkey userscripts with FF 57+ (with WebExtensions)?

女生的网名这么多〃 提交于 2019-12-11 02:24:41
问题 I can't find my userscript(s) in the Browser Debugger's Open file... box (with the name defined at // @name ). It seems that Annarfych's answer and Hjulle's answer to How to debug Greasemonkey script with the Firebug extension? do not work any more. Because of Michael's findings to Greasemonkey script folder missing? Apparently GreaseMonkey no longer stores the user scripts in gm_scripts for Firefox. [...] the scripts are apparently stored in an SQLite database file. 来源: https://stackoverflow

Get contents of an iframe which has ajax content, with Greasemonkey

核能气质少年 提交于 2019-12-11 02:10:08
问题 I have a Greasemonkey script which uses jQuery and detects if a "class" is present in the document. var damageMessage = $(".mw_error").text(); Thanks to ShankarSangoli he or she gave me the solution to finding the class when the iframe loads with. $("iframe").load(function(){ var damageMessage = $(this).contents().find(".mw_error").text(); }); The problem I have now is that some of the links in the iframe load content via ajax so the iframe doesn't refresh and I cant get the new value for the

addEventListener only working at page refresh?

旧巷老猫 提交于 2019-12-11 01:51:12
问题 I´m modifying the appearance of two drop down lists. No problems here. Everything works great. The only issue is that the addEventListener method only works at page refresh. How do I make this code work at page load without hitting the refresh button? window.addEventListener('load', function () { var CityCount = this.character.citynum ; var PosX = parseInt(CityCount) * (-15); var MyHeight = parseInt(CityCount) * 15 - 15; var MyStyle='div#citylist {width: 150px !important; margin-top: ' + PosX