greasemonkey

How to run a script every time a new page is loaded on YouTube?

本秂侑毒 提交于 2019-12-07 05:21:37
问题 Since some time last year, YouTube made it so that every page is not actually loading an entirely new page, but primarily just re-loading the contents in div#content . You can notice this when you click on a link in YouTube and see the red loading bar at the top of the page. I have a Greasemonkey script that modified elements on YouTube, but now that YouTube doesn't reload the entire page, the Greasemonkey script no longer fires on every "new" page. How can I make the Greasemonkey script fire

How to detect if a link already is in the user's bookmarks?

我的梦境 提交于 2019-12-07 04:11:25
Is it possible to determine from a Greasemonkey script if a link is already in the bookmarks or not? E. g. if I want to mark all links on the page which are bookmarked. Also, how can I find the name of the folder where this bookmark is stored? Brock Adams A Greasemonkey script cannot tell if a link is in the browser's/user's bookmarks because: Ordinary javascript is not allowed to know this for security reasons. Greasemonkey does not provide this capability and Greasemonkey's controlling developers have consistently refused to add similar capabilities . See, also, "How can I detect visited and

Modify Javascript Variable Using Greasemonkey

余生颓废 提交于 2019-12-07 03:58:28
Help, can anyone help me how to change javascript variable using greasemonkey? I already following the answers on this question: How can I change a JavaScript variable using Greasemonkey? and also this link: http://webdeveloper.com/forum/showthread.php?t=166658 but I unable to modify the counter variable value on the function with this script: // ==UserScript== // @name My Fancy New Userscript // @namespace http://use.i.E.your.homepage/ // @version 0.1 // @description enter something useful // @match https://welcome.telkomhotspot.info/telkomhs/freemax/ // @copyright 2012+, You // ==/UserScript

How to replace onclick event with GreaseMonkey?

瘦欲@ 提交于 2019-12-07 02:48:02
问题 This website has a gallery of images. Each time I click on a thumbnail image it opens the URL in a new tab (not because I set firefox to open links in new tabs). I want to just open the URL in the same window. An example of what the thumbnail images looks like is this. <span class="thumb" id="789"> <a href="/post/image/12345" onclick="return PostMenu.click(12345)"> <img class="preview" src="http://abc.com/image.jpg" title="title" alt=""> </a> </span> I believe that onclick="return PostMenu

GM_log and other GM functions don't work in Greasemonkey scripts

心已入冬 提交于 2019-12-07 01:52:16
问题 I have created a "Hello World" Greasemonkey script in Firefox which contains only one line of code: GM_log("Hello World"); This did not seem to function, at least it did not produce any output in my firebug console. The same with other GM_... functions like GM_wait When I replaced: GM_log("Hello World"); with: alert("Hello World") it worked (so the script headers are not the problem). I have also set the following about:config options to true: javascript.options.showInConsole extensions

Detect when new tweets are loaded using jQuery?

烈酒焚心 提交于 2019-12-06 21:54:30
You know how when you scroll to the bottom of a profile page (I'm talking about a user's personal page, not the timeline), new tweets are loaded automatically. I'm writing a UserScript in which I want to execute a function every time those new tweets are loaded. But I can't figure out a way to detect this new tweets loaded event. I assume its an AJAX request, right? So I tried the below two functions but to no avail. $(document).ajaxComplete(function() { alert("Complete! New tweets loaded!"); }); $(document).ajaxSuccess(function() { alert("Success! New tweets loaded!"); }); Here's what I have

want to auto click cancel in prompt in firefox

…衆ロ難τιáo~ 提交于 2019-12-06 21:17:41
OK so i currently play a game that has a random "bot-check" pop up in the tab in the pop up it has a "OK" and "cancel" button and I'm trying to find or make a grease monkey script to auto click "cancel" when it pop's up and since its random it needs to be a always on type script the prompt always shows up in the same x and y co-ordinates and button 1 is always OK and button 2 is always cancel hitting escape works just the same as hitting cancel ive tried google and i cant find anything // @require http://ajax.googleapis.com/ajax/libs/jquery/1.2.6/jquery.js $(".popup").bind('show',function(){ $

How can I enhance the functionality of a page whose source I shouldn't modify?

江枫思渺然 提交于 2019-12-06 19:12:25
A friend of mine uses a web-app for work related purposes. The app's built using PHP/MySQL , and while it has some JavaScript to make it easier to work with, it's not user friendly enough, and with a bit of extra JS, a lot of stuff could be automated. I would like to enhance that app, but I'd like to not have to modify the original server-side code. To do this, all I could think of was Greasemonkey. Is this the only way to do it, or am I missing out something? I'd also like to be able to use a modern JS framework, like jQuery. EDIT: I should tell you what improvements I want to make. There are

Greasemonkey: “GM_xmlhttpRequest is not defined” with the new update

橙三吉。 提交于 2019-12-06 17:04:27
Why this simple Greasemonkey script is not working for me https://jsfiddle.net/pghnsw8z/1/ ? I mean that instead of getting successful response I get error while making an ajax call. // ==UserScript== // @name _Starter AJAX request in GM, TM, etc. // @match *://php.net/* // @grant GM_xmlhttpRequest // @connect php.net // ==/UserScript== GM_xmlhttpRequest ( { method: 'GET', url: 'http://php.net/', onload: function (responseDetails) { // DO ALL RESPONSE PROCESSING HERE... alert(responseDetails); console.log ( "GM_xmlhttpRequest() response is:\n", responseDetails.responseText.substring (0, 80) +

Display a message, using waitForKeyElements, every time a class is added to element

北城余情 提交于 2019-12-06 16:44:40
I have been learning javascript, jQuery, and userscripts, as well as how to user firebug, the last 3 days in the attempt to display information about a selected customer on the website desk.com. So far, other than a lot of learning, I have little to show for. I simply can't get the message to update when a new tab is selected. The purple tab is the selected one. All I need to do is when a new tab is selected display a message. For testing lets just put this message in an javascript alert(). Here is the HTML for the entire top bar that contains the Customer 1 tab. <ul class="ui-tabs-nav ui