Forum Posts

53281 posts

Oct 26, 2007
flipjevandejam 3 posts

Topic: Userscripts.org discussion / Where are my favorite scripts?

As an option, you can check a script you like as your favorite, but where is the menu in which I can find all my checked favorites? That's the whole reason of making them a "favorite"...

 
Oct 26, 2007
Reggie Kickass 30 posts

Topic: Script development / editing problem.

i dont no what going on. but i cannot edit scripts at all.

 
Oct 26, 2007
TravelingEric 2 posts

Topic: Ideas and script requests / Auto Stop?

Ahh. I don't know anything about scripts, just looking for one that just stopped every couple seconds. Is that all I need to put in the script?

 
Oct 26, 2007
Descriptor 851 posts

Topic: Ideas and script requests / Auto Stop?

Guess what it is: http://developer.mozilla.org/en/docs/DOM:window...
However: it cannot stop the document from loading because Greasemonkey runs after (the HTML text is loaded).
But you can try this
setInterval(stop, 2000);
thats 2 seconds.

 
Oct 26, 2007
Descriptor 851 posts

Topic: Script development / Scope of Input Field -- Please Help!

See this: http://wiki.greasespot.net/Global_object and maybe better is: http://wiki.greasespot.net/Greasemonkey_Manual:...

First off; "window" seems kinda pointless to me, I think about using it sometimes but in Greasemonkey it doesn't really exist, so I guess it is simply ignored.
Since Greasemonkey runs inside an anonymous wrapper, there is no top level window object, this can not be accessed in the normal way. document is a property of window, so in some cases you can't access it either. This is why your first line of code don't work. However it should be more specific as in document.forms['timer'].elements['timerVal'], but .namedItem() is the way to go in Greasemonkey, so that part's fine.

The problem is the function reference in the setInterval(), where you are passing the actual function, which should be in quotes if it did work, as it's written it runs immediately and returns "undefined" probably. You need to pass a reference to the function...
setInterval(timerAlert, 500);what's up with void(0) there?
because "timerAlert()" will "disappear" by the time the timer is done.

Also I think you should stop the timer interval by giving it a name then clearing it when it hits 0...
interval = setInterval(timerAlert, 500);
and
clearInterval(interval)

Or it my be easier to use setTimeout() within the function.

 
Oct 26, 2007
TravelingEric 2 posts

Topic: Ideas and script requests / Auto Stop?

I was looking for a script that pretty much just acted like I was clicking the stop button or pressing escape every few seconds. Any help would be appriciated.

 
Oct 26, 2007
ochetski 19 posts

Topic: Script development / Multi-language script (do you want to translate?)

For ogame.jp

1. 技術数
2. リソースの色
3. メタルの色
4. クリスタルの色
5. デューテリウムの色
6. エネルギーの色
7. 一クリックは再起動し, ダブルクリックは色を消す。
8. 追加を削除する
9. 正常のパブ
10. 司令官の情報のパブのリンク
11. 将校のカジノのパブのリンク
12. アップグレードのパブのアイコン
13. ユーティリティ
14. リンクをリサイクル残がい
15. 宇宙船と防衛の上限
16. 利用になることの時間
17. -
18. エラー: 言語は違います。正しいことを選択してください。
19. 場所を選択してください
20. *全部月の漢字*
一月 二月 三月 四月 五月 六月 七月 八月 九月 十月 十一月 十二月
21. 完了すると、ページをリフレッシュする。。
22. 必要なすべてのリソースを生産していません!
23. 採掘
24. スパイ
25. 月をスパイリンク
26. 輸送機の電卓
27. 説明を最小限に抑える
28 。生産の電卓
29 。生産の時間
30 。生産の日間
31 。維持
32. 消費量のデューテリウム
33. 速度

I'm brasilian. Soooo it may have some mistakes.
;)

 
Oct 25, 2007
Jace Hollywood 3 posts

Topic: Ideas and script requests / SOMEBODY HELP!!!

Myspace Play Increaser Script
ANYBODY KNOWS IT...THANX

 
Oct 25, 2007
nekko 2 posts

Topic: Script development / Scope of Input Field -- Please Help!

Hello all,

I am trying to assign an input value to a variable. Please look at my
code below to see what I have done wrong. Thanks in advance.

This works outside of greasemonkey
----------------------------------------------------------

var time = document.timer.timerVal.value +"";

----------------------------------------------------------

//BEGIN Script

window.setInterval(timerAlert(),500);void(0);
function timerAlert() {
var form = document.forms.namedItem("timer");
var input = form.elements.namedItem("timerVal");
var time = input.value.+"";
var check = time.match("-");
if (check == "-"){
alert("time is up!");
}

else if (time == "0:00"){
alert("time is up!");
}

}

//END Script

 
Oct 25, 2007
Mark Zinck 3 posts

Topic: Ideas and script requests / IMDB ---> Library search link

I currently use a script that, when looking at a book at Amazon, will place a link to my local library for said book. (http://userscripts.org/scripts/show/618) I would like to have the same functionality when looking at movies on IMDB. Thanks!

Mark

 
Oct 25, 2007
LouCypher 457 posts

Topic: Script development / einfügen

Erhalten Sie ein Leben.

 
Oct 25, 2007
Chemo 1 post

Topic: Script development / einfügen

Wie kann ich das staemme script runterladen und einfügen ???

 
Oct 25, 2007
iJoel 6 posts

Topic: Script development / Putting html code into a script or at least appending it to the page

Thanks for your help so far, but I got it figured out.

And by seperate library I meant:

var myscript = document.createElement('script');
myscript.src = 'http://x.myspace.com/Feature/Messaging/ab/Messaging/Script/AddressBook.js';
document.body.appendChild(myscript);

and then using the function GetQuickAddContactDetail() (which is in AddressBook.js) in my script.

This fixed the problem I was having:

try {
element = document.createElement("<input />");
} catch (e) {
element = document.createElement("input");
element.setAttribute("name", "aradiobutton");
element.setAttribute("type", "hidden");
element.setAttribute("id", "addQuickInput");
}

document.body.appendChild(element);

Thanks for your help though. Finished my script :).
http://userscripts.org/scripts/show/13267

 
Oct 25, 2007
Descriptor 851 posts

Topic: Script development / Putting html code into a script or at least appending it to the page

What do you mean by separate library? Can you copy that function and add it to your script so that you can edit it?
Otherwise it's pretty hard to make constructive guesses.

 
Oct 24, 2007
iJoel 6 posts

Topic: Script development / Putting html code into a script or at least appending it to the page

Yeah, its an id.
I'm new to this whole thing, sorry.

But you see.
I'm calling a function from a seperate library in the script.

GetQuickAddContactDetail()

Now if I I simply call that script it will spit out an error saying addQuickInput is not defined.
Now that only happens on pages that don't have

---input type="hidden" id="addQuickInput" value="vff"/----

if the site that I'm on happens to have the code above then my script works perfect,
but if it doesn't that my script gives an error stating that addQuickInput is not defined.
And I have no idea about what to do about it. :(

 
Oct 24, 2007
stojshic 69 posts

Topic: Ideas and script requests / Need script, please help

This code didn't work... I included the site, and pasted your code, but it won't work...

 
Oct 24, 2007
ccarpita 8 posts

Topic: Ideas and script requests / Need script, please help

I'm assuming, by pop-up, you mean alert-box, which will prevent re-direction? This will also make your window flash on the taskbar, I think.

You need to start a new script, set the appropriate include site, and then paste the following into your script source:

window.setInterval(checkTimers, 500);
function checkTimers() {
  for(var i=0; i < timera.length; i++){
     if(timera[i] < 2) alert ("Time's Up!");
  }
}

 
Oct 24, 2007
znerp 1589 posts

Topic: Ideas and script requests / Remove the annoying messages above the script list.

I take from thi that you want to remove the "Site News" from the front page? If this is the case, then maybe you can simply bookmark http://userscripts.org/?page=1 instead of http://userscripts.org/. This does the trick for me.

 
Oct 24, 2007
Descriptor 851 posts

Topic: Script development / Putting html code into a script or at least appending it to the page

"addQuickInput" above is a document element id, not a JavaScript variable. Form data is submitted to the server, and adding a hidden form input won't help your client-side script at all.
I think you want a JavaScript var : http://developer.mozilla.org/en/docs/Core_JavaS...

 
Oct 24, 2007
Descriptor 851 posts

Topic: Script development / Setting the doctype with DOM methods

document.doctype : read-only - DOM level 2 doesn't support editing the document type declaration.
docType cannot be altered in any way, including through the use of methods inherited from the Node interface, such as insertNode or removeNode.

 
Oct 24, 2007
iJoel 6 posts

Topic: Script development / Putting html code into a script or at least appending it to the page

I've been making this annoying script.
For days nonstop now.
And I'm finally almost finished.
But the script breakes unless this line of code
is somewhere on the page thats being viewed.

I've never touched javascript before so I really have no idea how
I got this far. But I can figure no way for this to work so
I guess I need some help haha.

---input type="hidden" id="addQuickInput" value="vff"/----

It says I need to define "addQuickInput." And shows some error.
addQuickInput is a variable in some library, or maybe its a function
I really don't know. The HTML code above is the only way I know
how to define a variable. Nothing else I've tried works except
for manually inserting that code into any site I visit. And thats not ideal, so is there any way for me to do that automatically?

Thanks :)

 
Oct 24, 2007
lazyttrick 377 posts

Topic: Script development / Setting the doctype with DOM methods

try something like this:
1. get 'html' node
2. try to get previousSibling, avoid useless #text nodes with node.tagName... if there's no tagName just skip it to previous again

dunno if it works, but...

 
Oct 24, 2007
lazyttrick 377 posts

Topic: Script development / Changing function on the page?

you can try unsafeWindow, check out the examples
http://wiki.greasespot.net/UnsafeWindow

 
Oct 24, 2007
lazyttrick 377 posts

Topic: Script development / How to replace or remove inline javascript functions?

http://wiki.greasespot.net/UnsafeWindow

good you ask, because I need to know too

 
Oct 24, 2007
stojshic 69 posts

Topic: Ideas and script requests / Need script, please help

I need one simple script, at least I think it's simple. I want an popup window to warn me when the timer runs out of time, or when it is on the 00:01 sec left... I have the source code of the page, and the screenshot of it. Please, if u know the code for this, please post it in here as a reply, or something... This should be similar like the timer checkers for rapidshare. I looked the rapidshare code, and it looks easy, but i'm a n00b, and dont know how to change it. Here are the links of page source and image:

http://www.fileden.com/files/2007/10/23/1535612/Source.txt
http://www.fileden.com/files/2007/10/23/1535612/image.JPG