Search Results

Search found 200 results on 8 pages for 'greasemonkey'.

Page 3/8 | < Previous Page | 1 2 3 4 5 6 7 8  | Next Page >

  • greasemonkey: perform GM_xmlhttpRequest() from eval (follow up)

    - by Paul Tarjan
    How can you call GM_xmlhttpRequest inside of an eval where you are evaling some complicated code, some of which calls GM_xmlhttpRequest. This is a follow up to http://stackoverflow.com/questions/1074236 Here is some sample code: // ==UserScript== // @name Test GM AJAX // ==/UserScript== console = unsafeWindow.console; function fetch(msg) { console.log('fetching: '+msg); GM_xmlhttpRequest({ method: 'GET', url: 'http://google.com', onload: function(responseDetails) { console.log(msg); } }); } function complicated(arg1, arg2) { fetch(arg1 + arg2); } console.log('trying'); var code = 'complicated("Ya", "y!")'; function myEval(code) { eval(code); eval('setTimeout(function(){'+code+'},0)'); eval('setTimeout(fetch,0)'); eval('setTimeout(function(){console.log("here");fetch("cool")},0)'); fetch("BOO"); } myEval(code); which outputs: trying fetching: Yay! fetching: BOO fetching: Yay! fetching: 30 here fetching: cool BOO 30 So the only fetch that worked was the setTimeout(fetch,0) but I need to actually execute the code which includes come complicated code. Any ideas?

    Read the article

  • getElementById not a function (greasemonkey)

    - by Moose
    I'm running GM_xmlhttpRequest and storing the responseText into a newly created HTML element: var responseHTML = document.createElement('HTML'); onload: function() { responseHTML.innerHTML = response.responseText; } And then I am trying to find an element in responseHTML. console.log(responseHTML.getElementsByTagName('div')); console.log(responseHTML.getElementById('result_0')); The first works fine, but not the second. Any ideas?

    Read the article

  • Delay function with greasemonkey

    - by Riccardo
    I need a code that when CheckForZero happens for the first time, after 30 seconds happens again. var waitForZeroInterval = setInterval (CheckForZero, 0); function CheckForZero () { if ( (unsafeWindow.seconds == 0) && (unsafeWindow.milisec == 0) ) { clearInterval (waitForZeroInterval); var targButton = document.getElementById ('bottone1799'); var clickEvent = document.createEvent ('MouseEvents'); clickEvent.initEvent ('click', true, true); targButton.dispatchEvent (clickEvent); } };

    Read the article

  • Disable page redirects using Greasemonkey

    - by Tomer Cohen
    A website I wish to tweak is using window.location in order to redirect specific users to a blocking page. That website is doing it in plain <script> tag, so it is impossible to bypass it by overriding the onload event using document.body.setAttribute('onload','');. Is there another way to inject my code to the page without using Firefox extensions such as NoScript? <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title></title> <script type="text/javascript"> if (1) window.location="http://example.net" </script> </head> <body></body> </html>

    Read the article

  • dynamically create greasemonkey script

    - by qwertymk
    I'm trying to create a dynamic GM script. Here's what I thought would do it win = window.open('myScript.user.js'); win.document.writeln('// ==UserScript=='); win.document.writeln('// @name sample script'); win.document.writeln('// @description alerts hi'); win.document.writeln('// @include http://www.google.com/*'); win.document.writeln('// ==/UserScript=='); win.document.writeln(''); win.document.writeln('(function(){alert("hi");})()'); win.document.close(); Well it doesn't. Anyone have any ideas how to go about doing this?

    Read the article

  • Merging getComputedStyle and evaluate in Greasemonkey

    - by Keheliya Gallaba
    I need to get all the text nodes with a certain font-face in a page to an array. I tried.. textnodes = document.evaluate("//* [@style='font-family: foo;']//text()[" + "not(ancestor::script) and not(ancestor::style)]", document, null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null); and textnodes = document.evaluate("//* [@face='foo']//text()[" + "not(ancestor::script) and not(ancestor::style)]", document, null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null); But these does not work with pages that is styled by external CSS files. Seems getComputedStyle() is the way to go. I think what I need is something like.. var tags = document.getElementsByTagName('*'); for (var i in tags) { var style = getComputedStyle(tags[i], ''); if (style.fontFamily.match(/foo/i)) { textnodes.push(tags[i]); } } But text nodes were not returned in this method. Is there anyway I can use a hybrid of xpath evaluate() and getComputedStyle() or any other way to achieve this?

    Read the article

  • greasemonkey code modification

    - by muqtar
    Hi,all.. A user has helped me find hidden values in a page and display it using alert. If there are radio buttons and one of them is related to this value,is there a way to select the radio button automatically rathar than displaying the value in alert box.. Thanks... the code is as follows: var inputs = document.getElementsByTagName('input'); for (i=0; i<inputs.length; i++) { if (inputs[i].getAttribute("name") == "ans") { alert(inputs[i].getAttribute("value")); } } this "value" must be selected in the radio button rathar than alerting...

    Read the article

  • How to get Firefox Greasemonkey script to use a local cascading stylesheet?

    - by Umber Ferrule
    What's the correct syntax to link to a CSS file in the same directory as a Greasemonkey JavaScript? I've tried the following but it doesn't work: var cssNode = document.createElement('link'); cssNode.type = 'text/css'; cssNode.rel = 'stylesheet'; cssNode.href = 'example.css'; cssNode.media = 'screen'; cssNode.title = 'dynamicLoadedSheet'; document.getElementsByTagName("head")[0].appendChild(cssNode); If I can get this to work, it would be a lot easier than encasing CSS changes in JavaScript.

    Read the article

  • It's there a way to reload a greasemonkey script ?

    - by Shady
    It's there a way to reload a script from greasemonkey ? For example: When I enter on some specific website, the script from the greasemonkey works correctly, but when I change the page (asp in the website I guess), the script doesn't reload to take effect... How can I solve it?

    Read the article

  • Facebook Threatens Greasemonkey Script Writer

    <b>TechDirt:</b> "This time, it's Facebook, which is apparently trying to bully the maker of a Greasemonkey script that cleans up your Facebook live feed by removing annoying app notices (such as all the crap your friends are doing in Farmville and Mafia Wars)."

    Read the article

  • How do I use jQuery in my Greasemonkey Javascript scripts?

    - by tladuke
    I saw a question here and many blog posts about getting jquery into greasemonkey, but I can't get anything to work. Here's my script: // ==UserScript== // @name Hello jQuery // @namespace http://foo.bar // @description jQuery test script // @include * // ==/UserScript== #{contents of jquery.latest.js pasted in} unsafeWindow.jQuery = jQuery; $(document).ready(function() { alert('Hello world!'); }); I'm hoping to see an alert when I refresh a page, so I can start actually programming something. I've tried a bunch of other things and so far nothing works. The script is enabled in the little monkey menu... edit: the script part now looks like this: foo(); function foo() { $ = unsafeWindow.jQuery; $('tr td.row2:nth-child(4)').css("background-color", "#999"); } it doesn't work. I know the jQuery is good because I can run it from outside of greasemonkey. If instead of a jQuery function is just say alert('hello'); that works fine; I get the alert on page-load.

    Read the article

  • Is there a greasemonkey for IE? or, how do I get a website to use MSXML6 instead of MSXML5 ?

    - by Cheeso
    I don't know greasemonkey but I think it is a way to script or extend Firefox. Is there a greasemonkey for IE? for example: There's a website that is hosting a page that asks me to install MSXML5.0. I don't want MSXML5.0. I was thinking if I had a greasemonkey capability (if it is what I think it is), I'd be able to write a script that changes the 5.0 to 6.0 and everything would be cool. I know there's a way to do this kind of thing in Fiddler, if I have it running, and set up as a proxy.

    Read the article

  • Firefox 3.5.5 won't install greasemonkey

    - by Fuxi
    hi all, i've been struggling with this for a while now: i can't install greasemonkey on my firefox portable 3.5.5 :( it must be something with the latest update to 3.5.5. (i'm having win7 x64 ultimate) upgrading greasemonkey didn't work so i completely de-installed it and then tried (no success): installing greasemonkey via addons-dialog installing .xpi manually installing with "restart firefox" button installing by quitting + restarting firefox it simply just won't install / show up under addons. of course i de-activated all other plugins and started firefox as administrator. any ideas? thx

    Read the article

  • How can you replace a link's target in Greasemonkey?

    - by Derek
    I'm trying to write a script in Greasemonkey that will replace a link's target with something else, but with my limited Javascript knowledge I don't really know how to do this. Basically I'm trying to find all links containing a certain string of characters (ex: //a[contains(@href, 'xx')] ), and either replace them with another link, or append something to them (replacing 'abc123.com' with 'zyx987.com' or 'abc123.com' with 'abc123.com/folder'). If you could point me on the right path I'd greatly appreciate it.

    Read the article

  • Hype Machine Fluid Greasemonkey script broken help fixing it.

    - by newhen
    Hi, There is a greasemonkey script here that is suppose to work with a standalone fluid app. I just tried it out and it doesn't but I can't figure out what is wrong with it. Anybody wanna take a look at the code for me see if I am doing something wrong. Alot to ask but worth trying. Source: http://userscripts.org/scripts/review/62762 Screenshot fluid while the script is enabled: http://grab.by/4CoZ (there is no difference in the site at all)

    Read the article

  • is it possible that a greasemonkey script can work on one computer but not on another?

    - by plastic cloud
    i'm writing an greasemonkey script for somebody else. he is a moderator and i am not. and the script will help him do some moderating things. now the script works for me. as far as it can work for me.(as i am not a mod) but even those things that work for me are not working for him.. i checked his version of greasemonkey plugin and firefox and he is up to date. only thing that's really different is that i'm on a mac and he is pc, but i wouldn't think that would be any problem. this is one of the functions that is not working for him. he does gets the first and third GM_log message. but not the second one ("got some(1) .."). kmmh.trackNames = function(){ GM_log("starting to get names from the first "+kmmh.topAmount+" page(s) from leaderboard."); kmmh.leaderboardlist = []; for (var p=1; p<=(kmmh.topAmount); p++){ var page = "http://www.somegamesite.com/leaderboard?page="+ p; var boardHTML = ""; dojo.xhrGet({ url: page, sync: true, load: function(response){ boardHTML = response; GM_log("got some (1) => "+boardHTML.length); }, handleAs: "text" }); GM_log("got some (2) => "+boardHTML.length); //create dummy div and place leaderboard html in there var dummy = dojo.create('div', { innerHTML: boardHTML }); //search through it var searchN = dojo.query('.notcurrent', dummy).forEach(function(node,index){ if(index >= 10){ kmmh.leaderboardlist.push(node.textContent); // add names to array } }); } GM_log("all names from "+ kmmh.topAmount +" page(s) of leaderboard ==> "+ kmmh.leaderboardlist); does anyone have any idea what could be causing this ?? EDIT: i know i had to write according to what he would see on his mod screen. so i asked him to copy paste source of pages and so on. and besides that, this part of the script is not depending on being a mod or not. i got everything else working for him. just this function still doesn't on neither of his pc's.

    Read the article

  • Write an add-on or greasemonkey script to "Ajaxify" webpages in Firefox?

    - by Shizhidi
    Hello. I stumbled upon this add-on which "Ajaxifies" parts of its target website. https://addons.mozilla.org/en-US/firefox/addon/51789 I have a similar need like this. I want only part of the webpage's DOM to update upon receiving click on a link, since the website has a rather unified page layout. I have no experiences in writing FF add-ons but I did some basic Ajax and DOM before. So I am looking for programming tips on how to implement "Ajaxification" in a GreaseMonkey script, preferably. If it's not possible, making an add-on is also a sound choice which I'm willing to learn. Thanks in advance!

    Read the article

  • Best way to store data for Greasemonkey based crawler?

    - by Björn
    I want to crawl a site with Greasemonkey and wonder if there is a better way to temporarily store values than with GM_setValue. What I want to do is crawl my contacts in a social network and extract the Twitter URLs from their profile pages. My current plan is to open each profile in it's own tab, so that it looks more like a normal browsing person (ie css, scrits and images will be loaded by the browser). Then store the Twitter URL with GM_setValue. Once all profile pages have been crawled, create a page using the stored values. I am not so happy with the storage option, though. Maybe there is a better way? I have considered inserting the user profiles into the current page so that I could all process them with the same script instance, but I am not sure if XMLHttpRequest looks indistignuishable from normal user initiated requests.

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8  | Next Page >