greasemonkey

How can my script change a Specific Font (for a specific class)?

☆樱花仙子☆ 提交于 2019-12-23 09:57:16
问题 I'm trying to make my own Tampermonkey script to change a specific font style on a specific site from a cursive style to a sans-serif style. The HTML from the site is: <div class="text">Ask more leading questions</div> This is nested within 2 ids and one other class. The script I'm working on is based off of a few examples I've attempted to follow: // ==UserScript== // @name Change annoying fonts // @namespace http://use.i.E.your.homepage/ // @version 0.1 // @description change annoying

Change window.location prototype to disable certain redirects?

别说谁变了你拦得住时间么 提交于 2019-12-23 08:51:37
问题 I'm trying to selectively disable window.location , using Greasemonkey, at the start of the document. I don't want to fully disable javascript, just disable some redirects done with javascript. They look like this: window.location = "unwanted url"; 回答1: You can't change the window.location prototype, because this a "native property" of window and it is not configurable. On Firefox (Greasemonkey), if you try to override this then you will get errors like: TypeError: can't redefine non

Cross-domain post with Greasemonkey?

旧巷老猫 提交于 2019-12-23 05:51:43
问题 I need to post in the background with Greasemonkey. I tried to create an iframe dynamically and post to it, but it didn't work: function crossDomainPost() { // Add the iframe with a unique name var iframe = document.createElement("iframe"); var uniqueString = "CHANGE_THIS_TO_SOME_UNIQUE_STRING"; document.body.appendChild(iframe); iframe.style.display = "none"; iframe.contentWindow.name = uniqueString; // construct a form with hidden inputs, targeting the iframe var form = document

Greasemonkey script Auto click javascript button (ajax?) [duplicate]

微笑、不失礼 提交于 2019-12-23 04:25:19
问题 This question already has an answer here : How do I get Greasemonkey to click on a button that only appears after a delay? (1 answer) Closed 5 years ago . Ok Here is the source of the page. <div id="socialBox"></div> <div class="friendButton addFriend"> <a>+friend</a> </div> Here is my greasemonkey code // ==UserScript== // @name Auto click // @namespace Auto click // @description Auto click // @include https://* // @require http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js //

Is nested XMLHttpRequests with multiple closures a good idea?

徘徊边缘 提交于 2019-12-23 03:52:17
问题 I have a Greasemonkey script which operates on a search results page at a video site. The function of the script is to take a javascript link that opens a new window with a flash player, jump through some redirection hoops, and insert a regular link to the desired FLV file. I have changed the script to do silly but structurally equivalent things to en.wikipedia.org. My question is whether the 3 nested closures and the nested xmlhttprequests is the best way to go about this. // ==UserScript==

Detect when new tweets are loaded using jQuery?

試著忘記壹切 提交于 2019-12-23 03:48:04
问题 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!");

Run a Greasemonkey script on changes to an internal tab (not a browser tab)?

我的未来我决定 提交于 2019-12-23 02:44:12
问题 I'm trying to build a script that alters the coloring/layout of tags on the tag page in the user-profile section of Stack Overflow. I tested the script and it runs. The problem is that I would like to re-run it when I click on the sort options [ votes ] and [ name ]. I have tried: Triggering off the jQuery ready event. Attaching an onclick handler (which is useless since it runs before the page reloads). Attaching a load event listener to the table with the tags, etc., to no avail. I am sure

Run a Greasemonkey script on changes to an internal tab (not a browser tab)?

五迷三道 提交于 2019-12-23 02:43:59
问题 I'm trying to build a script that alters the coloring/layout of tags on the tag page in the user-profile section of Stack Overflow. I tested the script and it runs. The problem is that I would like to re-run it when I click on the sort options [ votes ] and [ name ]. I have tried: Triggering off the jQuery ready event. Attaching an onclick handler (which is useless since it runs before the page reloads). Attaching a load event listener to the table with the tags, etc., to no avail. I am sure

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

﹥>﹥吖頭↗ 提交于 2019-12-23 01:52:35
问题 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().

Greasemonkey/Tampermonkey script to redirect to doubly modified URL

ぐ巨炮叔叔 提交于 2019-12-23 01:01:18
问题 The target page has the URL: ouo.io/tLnpEc.html And I want to change the URL to: ouo.press/tLnpEc That is: .io to .press and remove .html . I already have this but it ain't working (It redirects to ouo.press but still doesn't remove .html): var url = window.location.host; if (url.match("//ouo.io") === null) { url = window.location.href; if (url.match("//ouo.io") !== null){ url = url.replace("//ouo.io", "//ouo.press"); } else if (url.match("/*.html") !== null){ url = url.replace("/*.html", " "