Loading. Please Wait...
|
|
|
HV Script Thread, Discuss your creations. Includes guidelines and infos for script creation (2020-02-28 upd) |
|
May 13 2012, 20:19
|
etothex
Group: Members
Posts: 4,557
Joined: 18-May 09
|
QUOTE(LangTuTaiHoa @ May 10 2012, 05:11) Hm the first version feels a little one-sided, since you can only enjoy the hassle-free MM if the user you want to contact provides the link. I made it a little easier by embedding a MM link to every user pane (IMG:[ invalid] style_emoticons/default/biggrin.gif) Just click on the link below any username and it takes you directly to the MM screen to write a new mail to that user. The default subject and body can be edited in the script. Default subject is "Hi there" and body is "WTB".Download: MoogleMail template 1.1
mmtemplate1.1.user.zip ( 925bytes )
Number of downloads: 329
just thought i'd mention that the "default" will overwrite anything you've manually inputted when you add attachments, so I removed the subj/body parameters from mine.
|
|
|
|
|
|
May 13 2012, 20:46
|
LangTuTaiHoa
Group: Banned
Posts: 1,792
Joined: 8-June 10
|
QUOTE(etothex @ May 14 2012, 01:19) just thought i'd mention that the "default" will overwrite anything you've manually inputted when you add attachments, so I removed the subj/body parameters from mine.
Quick fix for this issue (too lazy to upload a new version (IMG:[ invalid] style_emoticons/default/tongue.gif) ) Find these lines CODE var inputs = document.getElementsByClassName('stdinput'); if(inputs[0].name == 'message_to_name') inputs[0].value = getUrlVars()['to'].split('%20').join(' '); if(inputs[1].name == 'message_subject') inputs[1].value = getUrlVars()['subject'].split('%20').join(' '); if(inputs[2].name == 'message_body') inputs[2].value = getUrlVars()['body'].split('%20').join(' '); Then wrap them up like this CODE if(document.referrer.indexOf('http://hentaiverse.org/?s=Bazaar&ss=mm') == -1) { var inputs = document.getElementsByClassName('stdinput'); if(inputs[0].name == 'message_to_name') inputs[0].value = getUrlVars()['to'].split('%20').join(' '); if(inputs[1].name == 'message_subject') inputs[1].value = getUrlVars()['subject'].split('%20').join(' '); if(inputs[2].name == 'message_body') inputs[2].value = getUrlVars()['body'].split('%20').join(' '); } Then the values you changed for subject and body won't be overwritten by the script after you attach something (IMG:[ invalid] style_emoticons/default/happy.gif)
|
|
|
|
|
|
May 17 2012, 18:46
|
hzqr
Group: Gold Star Club
Posts: 4,672
Joined: 13-May 09
|
countdowns.user.zip ( 757bytes )
Number of downloads: 212Fixes broken auction countdowns (when the server is down). Dates and times are (or should be) localized.
|
|
|
May 17 2012, 23:32
|
grumpymal
Group: Gold Star Club
Posts: 10,923
Joined: 2-April 08
|
Guys, you really need to practice better code documentation. You should always, ALWAYS, ALWAYS put the script's name, the author's name (or authors' names), a description of what the script does, and if you can help it a url back to where that script and info on it can be found. Don't be a bunch schmucks.
|
|
|
May 18 2012, 01:29
|
hzqr
Group: Gold Star Club
Posts: 4,672
Joined: 13-May 09
|
We hold these truths to be self-evident: that all men hate writing documentation. And developing GUIs. Though there are some that love the latter. Madmen.
|
|
|
May 18 2012, 02:13
|
grumpymal
Group: Gold Star Club
Posts: 10,923
Joined: 2-April 08
|
I don't care if you don't comment your code down to the last detail, but at least label the damn things so someone can read the tin and know what they're getting.
|
|
|
May 18 2012, 06:55
|
hzqr
Group: Gold Star Club
Posts: 4,672
Joined: 13-May 09
|
hotkey3bfix.user.zip ( 624bytes )
Number of downloads: 260This post has been edited by Tiap: May 18 2012, 06:56
|
|
|
May 23 2012, 05:52
|
Evil Scorpio
Group: Gold Star Club
Posts: 6,565
Joined: 9-May 10
|
QUOTE(Tiap @ May 22 2012, 09:15) ...so I ended up making one anyway for shits and giggles.
magicscores.user.zip ( 1005bytes )
Number of downloads: 544It calculates the scores (relative to the equipped set) for all 7 elements (fire/cold/elec/wind/holy/dark/soul) and prints the results in the statistics pane (below Damage Mitigations). Not posting it in the script thread since I doubt a lot of people (read: no one) would be interested. Must be here, 'cause it's awesome. And also this script has fixed my problems with side panel when using custom font. (IMG:[ invalid] style_emoticons/default/biggrin.gif)
|
|
|
May 25 2012, 15:14
|
varst
Group: Gold Star Club
Posts: 11,561
Joined: 30-March 10
|
Is there a way to get the equip's raw data just by scrolling over the equip? And I need that to be recorded in a text file.
|
|
|
|
|
|
May 25 2012, 23:48
|
grumpymal
Group: Gold Star Club
Posts: 10,923
Joined: 2-April 08
|
QUOTE(varst @ May 25 2012, 09:14) Is there a way to get the equip's raw data just by scrolling over the equip? And I need that to be recorded in a text file.
Equipment stats are generated on page load an inserted in an element attribute for that particular equip. Theoretically, you could write a script that fires when the mouse-over popup is generated to parse only that current piece instead of scraping the entire page. However, JS cannot write data to an external file due to security reasons. The best that could be done is to store the parsed data until the user calls it up and manually copies and pastes it into their text editor of choice.
|
|
|
|
|
|
May 25 2012, 23:52
|
Evil Scorpio
Group: Gold Star Club
Posts: 6,565
Joined: 9-May 10
|
QUOTE(derpymal @ May 26 2012, 01:48) Equipment stats are generated on page load an inserted in an element attribute for that particular equip. Theoretically, you could write a script that fires when the mouse-over popup is generated to parse only that current piece instead of scraping the entire page. However, JS cannot write data to an external file due to security reasons. The best that could be done is to store the parsed data until the user calls it up and manually copies and pastes it into their text editor of choice. How about writing it to clipboard? Can JS perform it? (IMG:[ invalid] style_emoticons/default/huh.gif)
|
|
|
|
|
|
May 26 2012, 02:38
|
grumpymal
Group: Gold Star Club
Posts: 10,923
Joined: 2-April 08
|
QUOTE(Evil Scorpio @ May 25 2012, 17:52) How about writing it to clipboard? Can JS perform it? (IMG:[ invalid] style_emoticons/default/huh.gif) No. Security. JS is restricted to the sandbox given to it by the browser. For example, you can't access any of HV's script functions from within a userscript because they're in two different sandboxes. However, you can access something like jQuery if it was loaded by another script since they're in the same sandbox.
|
|
|
May 26 2012, 02:58
|
hzqr
Group: Gold Star Club
Posts: 4,672
Joined: 13-May 09
|
There is an experimental HTML5 File API that (I think) can allow restricted access to the filesystem. It's pretty crappy from the looks of it, though.
|
|
|
May 26 2012, 05:36
|
ChosenUno
Group: Gold Star Club
Posts: 4,170
Joined: 23-February 10
|
QUOTE(varst @ May 25 2012, 20:14) Is there a way to get the equip's raw data just by scrolling over the equip? And I need that to be recorded in a text file.
The one possible way I can think of to make this happen is to write a userscript that makes an AJAX call to a localhost server. On this server you can do all the processing and saving to file. I'm not sure whether you're allowed to AJAX from within a userscript, though.
|
|
|
|
|
|
May 26 2012, 05:56
|
grumpymal
Group: Gold Star Club
Posts: 10,923
Joined: 2-April 08
|
QUOTE(ChosenUno @ May 25 2012, 23:36) The one possible way I can think of to make this happen is to write a userscript that makes an AJAX call to a localhost server. On this server you can do all the processing and saving to file.
I'm not sure whether you're allowed to AJAX from within a userscript, though.
That would require setting up a localhost. And I think AJAX is supported, but you might need to include an external framework to make it work.
|
|
|
|
|
|
May 26 2012, 06:05
|
ChosenUno
Group: Gold Star Club
Posts: 4,170
Joined: 23-February 10
|
QUOTE(derpymal @ May 26 2012, 10:56) That would require setting up a localhost. And I think AJAX is supported, but you might need to include an external framework to make it work.
It's cumbersome, but much better than copy-pasting, isn't it? (IMG:[ invalid] style_emoticons/default/laugh.gif) And once you have it set up, it's pretty much auto-pilot from there. And I think for AJAX, you only really need jQuery to make it simpler on yourself. As for the localhost, just a simple PHP server would do nicely (IMG:[ invalid] style_emoticons/default/biggrin.gif)
|
|
|
May 26 2012, 06:07
|
grumpymal
Group: Gold Star Club
Posts: 10,923
Joined: 2-April 08
|
jQuery IS an external framework.
|
|
|
May 26 2012, 06:12
|
ChosenUno
Group: Gold Star Club
Posts: 4,170
Joined: 23-February 10
|
QUOTE(derpymal @ May 26 2012, 11:07) jQuery IS an external framework.
Well, you can also do AJAX without jQuery, but that's a bitch to do (IMG:[ invalid] style_emoticons/default/laugh.gif) It's not strictly required though, since he probably won't be releasing the script, so a heavily customised vanilla JavaScript script would work just as well. Btw, I wasn't arguing with your point there (IMG:[ invalid] style_emoticons/default/laugh.gif)
|
|
|
6 User(s) are reading this topic (6 Guests and 0 Anonymous Users)
0 Members:
|
|
|
|
|
|
|