Все вопросы: [greasemonkey]

135 вопросов

похожие теги:
0
голосов
1ответов
257 просмотров

Greasemonkey jQuery scope issue

Why do I get a 1, then a 0 when this script runs in greasemonkey: //jQuery source code..... alert(jQuery('body').size()); (function(jQuery){ var find = jQuery.find; jQuery.find = function(selector, context){ return find(selector, context); }; })(jQuery); alert(jQuery('body'...

15
голосов
3ответов
9907 просмотров

User Script Debugging in Google Chrome

What's the best way to debug custom User Scripts (aka Greasemonkey) in Chrome? Is there a way to enable User Script tracking in the Developer Tools?

0
голосов
2ответов
1456 просмотров

Greasemonkey (JavaScript) textarea question

I have written a basic Greasemonkey script which passes an output out to a textarea, like this: var obj = document.getElementById("comment").innerHTML = "\n" + "Note:" + "\n" + "\n" + output_string; It works like a charm, if you change the value from the source, it will update the textarea. Ho...

0
голосов
1ответов
119 просмотров

javascript and greasemonkey question

i wanna get a price inside a page and then multiple it by 0.93 then write the result after first price. but i couldn't be able to grab the price from page. for example i want to grap "900 TL" string from "900 TL" you can see all codes of page by visiting http://www.sahibinden.com/cok_temiz_asu...

3
голосов
1ответов
475 просмотров

How to write cross-browser compatible userscripts?

My past attempts at writing userscripts ended working in Firefox, but not Opera, because of subtle differences between the two browsers. Is it possible to use of those libraries that abstract the differences away like jQuery inside userscripts to make them cross-browser compatible with little eff...

-1
голосов
1ответов
1332 просмотров

Greasemonkey script to select a dropdown

Would anyone be able to tell me the Greasemonkey code to make this page have "Any" as the default selected spoken language from the dropdown. It defaults to English as selected for me.

5
голосов
3ответов
3389 просмотров

Greasemonkey script compatibility with Firefox, Safari, Opera and chrome (onload event)

Say you wanted a Greasemonkey script to be compatible with Safari and Chrome. Whereas in Firefox the Greasemonkey scripts only run when the DOM is ready. Chrome, Safari and Opera seem to run the Greasemonkey scripts before the DOM is ready. So what I am looking for is a solution that will only ...

-1
голосов
3ответов
1440 просмотров

Sort lines on webpage using javascript/ regex

I'd like to write a Greasemonkey script that requires finding lines ending with a string ("copies.") & sorting those lines based on the number preceding that string. The page I'm looking to modify does not use tables unfortunately, just the br/ tag, so I assume that this will involve Regex: ...

4
голосов
3ответов
2104 просмотров

Is it possible to use workers in a Greasemonkey script?

I would like to use the Web Worker facility introduced in Firefox 3.5 to enhance a Greasemonkey script I'm working on. Is this even possible? I've done some experimentation, but I can't get past the issue of loading a worker script from an arbitrary domain. For example, this does not work: va...

-1
голосов
5ответов
3976 просмотров

CKEDITOR not defined by my Greasemonkey script?

I'm using Greasemonkey to replace a KTML editor with CKEditor. I first get rid of KTML, then I load jQuery and then ckeditor.js and that works, apparently. But, when I go to replace the <textarea>, Firebug reports "CKEDITOR is not defined" and my textarea stays normal. Am I loading them i...

0
голосов
1ответов
106 просмотров

Using Greasemonkey, is it possible to make some parts of the script apply to certain sites and other parts apply to different sites?

The reason I want to do this is that I'm writing a script for meebo.com that involves changing the background and replacing some pictures with css. I'd like to add links to it from other sites (namely Gmail, Google Calendar, etc.) Is it possible to accomplish this with one Greasemonkey script? ...

14
голосов
2ответов
4412 просмотров

How to exclude iframe in Greasemonkey or Tampermonkey?

I have created a Greasemonkey script for a website. What the script does is adding a div at the end of the page. document.body.insertBefore(myDiv, document.body.firstChild); But now the site adds an iframe for google-ads, as a result my div appears in the iframe too, which is not what I want. ...

7
голосов
1ответов
1961 просмотров

Is there a way to automatically convert a Greasemonkey script into a bookmarklet?

For those who don't know what a bookmarklet is: http://en.wikipedia.org/wiki/Bookmarklet

0
голосов
2ответов
286 просмотров

HighRise jQuery parsing

I want to add h323:number style links to HighRise contact numbers, so that users can click a link to dial the IP phone... The html I'm looking at is: <table> <tbody> <tr> <th>Phone</th> <td>+44 (0)1123 1231312<span>Work</span>&lt...

2
голосов
1ответов
573 просмотров

Merging XPathResults from document.evaluate

I'm doing a bunch of document.evaluate then iterating through each result with a for loop on result.snapshotLength. Since I do the same thing inside each loop (a thisDiv.parentNode.removeChild) I would like to do just one loop. I've read that : The fifth parameter can be used to merge th...

0
голосов
1ответов
683 просмотров

How to include cluetip in a GreaseMonkey script

I'm trying to include cluetip in my GreaseMonkey script. To do this I've defined my userscript as follows: // ==UserScript== // @name myscript // @namespace myscript // @description This is my script // @require http://plugins.learningjquery.com/cluetip/jquery.cluetip.js...

3
голосов
1ответов
2842 просмотров

coding favicon in base64

hello i'm writing a GM user script and i want to change the favicon dynamically changing it the old way is easy but i want to encode it in base64 to avoid hosting it this is what i have done after hosting the favicon var link = document.createElement('link'); link.type = 'image/x-icon'; link.re...

0
голосов
5ответов
455 просмотров

How to do multiple regular expressions, each time refining the results?

Why can't I output my regex to a variable, and then run regex on it a second time? I'm writing a greasemonkey javascript that grabs some raw data, runs some regex on it, then runs some more regex on it to refine the results: // I tried this on :: http://stackoverflow.com/ var tagsraw = (docum...

0
голосов
2ответов
1346 просмотров

Greasemonkey script not setting innerHTML properly

My grease monkey script is the following: document.getElementsByTagName('html')[0].innerHTML = "<b>asdfdsfa</b>"; alert( document.getElementsByTagName('html')[0].innerHTML ); When I run the script, the alert says: <html>b<asdfdsfa</b< And th...

1
голосов
1ответов
400 просмотров

Simplest script for Greasemonkey or Stylish to select “100 Results” from the “Results per page:” dropdown menu in Google’s Advanced Search page?

Can anybody come up with the simplest script for Greasemonkey or Stylish to select “100 Results” from the “Results per page:” dropdown menu in Google’s Advanced Search page?

1
голосов
1ответов
925 просмотров

How to embed audio file in HTML if it's being sent as octet-stream?

I'm trying to write a Greasemonkey script that will convert all "Play" links on a page to embedded audio (using the <embed> tag). When I use a link that I get from a GMail attachment, it works like a charm. When I use a link from another site (Digium Switchvox), the HTTP response header h...

33
голосов
9ответов
55997 просмотров

How to determine why a Greasemonkey script is not running

I am trying to get a Greasemonkey script to run on a page. But it does not. How do you debug scripts? What are the smallest possible baby-steps to start a new Greasemonkey script?

0
голосов
1ответов
203 просмотров

How to compile/package an IE7PRO script as an IE plugin?

is it possible to compile and package IE7PRO scripts as IE plug-in ? I've already developed a script on GreaseMonkey that's working fine under Firefox, and I wanted to port that js script under IE. is there any tools or libraries that allows this kind of compilation (.js (IE7PRO) -> IE Plug...

0
голосов
2ответов
1168 просмотров

How to simulate the click on Refresh link in Gmail?

I'm trying to write a Greasemonkey script that works with Gmail. the script is working good but I need to add simulate a refresh of the Gmail page by "hitting" programmatically the Refresh button. is this possible ? FYI, the refresh link in Gmail isn't a link like but rather : Refresh I've trie...

2
голосов
3ответов
1584 просмотров

Matching multiline Patterns

I want to use greasemonkey to scrape wiki data from Last.fm (this is not possible with their REST api). I can grab the page fine with GM_xmlhttpRequest(), and it is returning properly. I do not want to use a DOM processor to process the whole page, since I only want a small chunk, so I'm using r...

4
голосов
2ответов
3104 просмотров

GM_addStyle not working

I am trying to make this very simple script to replace the header on google: // ==UserScript== // @name Hell yeah // @description HELL YEAH // @include http://www.google.* // ==/UserScript== GM_addStyle("div #logo {background-image: url('http://img220.imageshack.us/img220/567...

-3
голосов
2ответов
1674 просмотров

Firefox plugin or greasemonkey script to insert javascript

I am developing an app that analyzes the typing pattern of a user. To accomplish this, I need to change the HTML of the web page that the user is on (e.g. yahoo.com) - for all the text box items in the page, add a few JavaScript functions to capture the key down and key up events. So, I need to b...

5
голосов
1ответов
1172 просмотров

iframe undefined in Greasemonkey script

I have created a Greasemonkey script that runs fine in the firebug editor, with the Greasemonkey specifics removed, but not when I try to package it as a userscript. The Firefox error console is reporting that an iframe I am trying to use is undefined. I've cut the userscript down to a minimum ...

1
голосов
3ответов
5737 просмотров

jQuery.ajax call returns an empty data container but the raw URL works

I'm using a Greasemonkey script to pull data from the RSS feed http://www.instapaper.com/folder/48337/rss/11185/QBV0RZfH4KBO7GwgrR3D8b7sv90 and insert it into a page with jQuery. The address returns valid RSS, but when Greasemonkey fires an Ajax call (see below) it always returns an empty request...

0
голосов
2ответов
999 просмотров

Firefox extension to create a new icon or replace existing icon in the location/address bar

I want to create a Firefox extension that creates a new icon in the address bar or replaces the existing one with the one specified in the extension. And then, add some javascript to display this custom logo only when the user is viewing a particular domain. If this is not doable for the locati...