greasemonkey

Greasemonkey script to remove HTML between specific comments?

烂漫一生 提交于 2020-01-14 05:50:48
问题 In order to block some JavaScript that I don't want to execute when I load a page, I would like to have a Greasemonkey script that deletes everything between two HTML comment tags. For example: <!-- sub script --> Lines containing script elements to be removed <!-- end sub script --> I have previously tried removing the script elements using a sample script that was suggested to me, but it isn't working as expected. That script was this: var script = document.querySelectorAll('script[src*=

Add class in jQuery in Greasemonkey script

南笙酒味 提交于 2020-01-14 03:24:13
问题 I Asked a question earlier and was given a Working solution. One thing I want to do is incorporate jQuery to remove a class F-link-secondary and replace it with F-rank-good/bad/neutral depending on the value of deltaText. On most pages this is what I see: But on a certain page, the F-rank-XXX class is not there and instead there is just a single F-link-secondary which has no style. Here is what I want to do but I am not sure how to incorporate it with the Greasemonkey script. function getRank

How to change a link's text based on different phrasing of the link's title attribute?

时光毁灭记忆、已成空白 提交于 2020-01-14 03:23:26
问题 In my Fantasy football page, it gives stats about the opposing team and when you mouseover it tells you how many points they give up (See picture). Here is the relevant code pertaining to this: <a class="Inline F-rank-good" title="WAS gives up the 3rd most fantasy points to the QB position." target="_blank" href="/f1/777400/pointsagainst?pos=QB&ntid=28">Was</a> How do I create a Greasemonkey script that will add the # to the end of the team name (i.e. "Was" becomes "Was - 3" One problem there

How to load a greasemonkey script after AJAX-Request

假装没事ソ 提交于 2020-01-12 10:16:13
问题 I have a simple greasemonkey script that makes some simple dom manipulation. The greasemonkey script is loaded after the DOM is loaded, that's fine so fare and it does work for the initial Page. But on this site (it's twitter ;-) ) parts of the page get loaded after a click by xmlhttprequest and this part did not get manipulated by my greasemonkeyscript. Is there a simple possibility to run the script again after the xmlhttprequest is loaded or after the DOM is changed by the request? 回答1: A

Script to fire an event as soon as an element exists?

随声附和 提交于 2020-01-11 07:49:08
问题 I'm trying to write a little Greasemonkey script for achieving some tasks in Facebook, like hiding news and such. The problem is: I'm having an ID to an element which isn't existing yet in the DOM. It's the little box which appears when hitting a post's arrow-icon. How can I create an event handler through jQuery which fires as soon as the element exists? 回答1: This is a common problem. You can act on AJAXed-in elements as they appear by using the waitForKeyElements() utility. (See "Fire

How to transform an XML file with XSLT, using a Greasemonkey script?

孤街浪徒 提交于 2020-01-11 07:04:41
问题 I have a search server that provides a test page where I can input a query and it returns the results in XML. I want to be able to go through the results in a more user friendly way so I started playing around with XSLT and I have a simple style-sheet now that turns a somehow bloated XML into a simple table showing just some of the data. This works fine when I do it locally - that is, adding the XSL declaration to the XML and then opening the XML in a browser like Firefox. What I want to do

How to transform an XML file with XSLT, using a Greasemonkey script?

元气小坏坏 提交于 2020-01-11 07:04:11
问题 I have a search server that provides a test page where I can input a query and it returns the results in XML. I want to be able to go through the results in a more user friendly way so I started playing around with XSLT and I have a simple style-sheet now that turns a somehow bloated XML into a simple table showing just some of the data. This works fine when I do it locally - that is, adding the XSL declaration to the XML and then opening the XML in a browser like Firefox. What I want to do

Can Greasemonkey fetch values from a paginated sequence of URL's?

╄→尐↘猪︶ㄣ 提交于 2020-01-10 02:09:31
问题 I would like to fetch a value from https://play.google.com/store/account* , which makes the user page through its output. For example: /store/account?start=0&num=40 , then /store/account?start=40&num=40 , etc. Now, when I visit https://play.google.com/apps , I'd like Greasemonkey to tot-up the values from the /store/account pages and then display the final value on that page. The code listed below can total the value, that I want, from the /store/account pages. However, I want to insert the

Can Greasemonkey fetch values from a paginated sequence of URL's?

坚强是说给别人听的谎言 提交于 2020-01-10 02:09:21
问题 I would like to fetch a value from https://play.google.com/store/account* , which makes the user page through its output. For example: /store/account?start=0&num=40 , then /store/account?start=40&num=40 , etc. Now, when I visit https://play.google.com/apps , I'd like Greasemonkey to tot-up the values from the /store/account pages and then display the final value on that page. The code listed below can total the value, that I want, from the /store/account pages. However, I want to insert the

Can Greasemonkey fetch values from a paginated sequence of URL's?

限于喜欢 提交于 2020-01-10 02:09:09
问题 I would like to fetch a value from https://play.google.com/store/account* , which makes the user page through its output. For example: /store/account?start=0&num=40 , then /store/account?start=40&num=40 , etc. Now, when I visit https://play.google.com/apps , I'd like Greasemonkey to tot-up the values from the /store/account pages and then display the final value on that page. The code listed below can total the value, that I want, from the /store/account pages. However, I want to insert the