greasemonkey

Greasemonkey AJAX request from a different domain?

偶尔善良 提交于 2019-12-21 05:02:44
问题 I'm trying to get JavaScript (with Greasemonkey) to pull data from my own site to customize another site. The code I'm using is as follows: function getURL(url, func) { var xhr = new XMLHttpRequest(); xhr.open("GET", url, true); xhr.onload = function (e) { if (xhr.readyState == 4) { if (xhr.status == 200) { func(xhr.responseText, url); } else { alert(xhr.statusText, 0); } } }; xhr.onerror = function (e) { alert("getURL Error: "+ xhr.statusText); // picks up error here }; xhr.send(null); } The

Changing HTML With Greasemonkey

ε祈祈猫儿з 提交于 2019-12-21 04:58:46
问题 I've been searching for a way to change HTML on a website my main problem being it does not have an id tag that I can use to pull it out and change it, using Greasemonkey JavaScript. sorry I left that part out. I am logging the current winner on a server and trying to use JavaScript via Greasemonkey to show the last winning time on the game site. Below is part of the source, in the example below I'd want to add the current time beside Raiton between the <b> tags. <html> <head> Most Recent

setTimeout not working in Greasemonkey user script when JS disabled in browser

我是研究僧i 提交于 2019-12-21 04:46:08
问题 I'm working on a project that requires my user script be run on pages as they are rendered without executing any of the page's JavaScript. That is to say, we need to browse with JavaScript disabled. I've encountered a problem though when I try to delay execution of a function within my script. Whenever I make a call to window.setTimeout , the function I pass in never gets executed. I think maybe this function is actually getting called on unsafeWindow instead of window. Is there any

Recommendations for a “Getting started with Greasemonkey” tutorial [closed]

亡梦爱人 提交于 2019-12-21 03:58:09
问题 As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 8 years ago . I'm interested in writing some Chrome compatible Greasemonkey scripts, but I'm finding that there are few updated tutorials on how to

Recommendations for a “Getting started with Greasemonkey” tutorial [closed]

▼魔方 西西 提交于 2019-12-21 03:58:07
问题 As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 8 years ago . I'm interested in writing some Chrome compatible Greasemonkey scripts, but I'm finding that there are few updated tutorials on how to

How safe is Greasemonkey?

蓝咒 提交于 2019-12-20 11:51:13
问题 I've never actually used greasemonkey, but I was considering using it. Considering that GreaseMonkey allows you to let random people on the Internet change the behavior of your favorite websites, how safe can it be? Can they steal my passwords? Look at my private data? Do things I didn't want to do? How safe is Greasemonkey? Thanks 回答1: Considering that GreaseMonkey allows you to let random people on the Internet change the behavior of your favorite websites, how safe can it be? It's as safe

How can I get greasemonkey to call a function on a page after it loads

北战南征 提交于 2019-12-20 08:58:23
问题 I have a very simple greasemonkey script that I want to call an already existing javascript function on the page. I've read the documentation and nothing seems to work window.setTimeout(function() { alert('test') // This alert works, but nothing after it does myFunction() // undefined window.myFunction() // undefined document.myFunction() // undefined }, 1000); 回答1: Try using: unsafeWindow.myFunction(); More details and info - http://wiki.greasespot.net/UnsafeWindow 回答2: One way to call a

How can I modify the title of a site using JavaScript?

南楼画角 提交于 2019-12-20 07:36:55
问题 When viewing a torrent page, the title of the tab is: Bitsoup.org The Best site for your Torrent appetite :: Details for torrent "ABC" where "ABC" is the name of the torrent file. Unfortunately, when I have 3+ tabs open, I can not see what the name of the torrent file is. I am attempting to create a Greasemonkey script to truncate, or split, the title, so that it only displays the torrent-name, and not the beginning part. I am aware that you can modify the title associated with a page by

javascript on page load check if a span (under <tr>) with a specific class exist, if does not exist remove the entire <tr>

我是研究僧i 提交于 2019-12-20 06:04:29
问题 I am trying to create my own greasemonkey script for my favorite directory listing site :) The thing is not everything it list is beneficial to me, I inspected the website code and as it seems, each entry is under Now, and as it seems, I am only interested with those which have this format: <tr class="project-description"> <td colspan="6"> <div class="project-desc-inner"> <div class="project-synopsis"> <p class="trunk8">This is an entry</p> </div> <div class="project-verification"> <span

Greasemonkey is unable to find/modify/delete content? (on Twitch.tv)

≡放荡痞女 提交于 2019-12-20 05:31:44
问题 I'm trying to remove various games off the twitch sub-page "Game List" (twitch.tv/directory) but I'm getting nowhere. I've debugged with alert, timers and @run-at document-end to no avail, the script reaches the page correctly but once I try to manipulate content nothing happens. This is what I use to test it: // ==UserScript== // @name TwitchDeleteTest // @namespace to.be.continued // @include http*://*twitch.tv/directory* // @version 1 // @grant none // ==/UserScript== var rmLoL = document