Welcome Guest ( Log In | Register )

291 Pages V « < 82 83 84 85 > »   
Reply to this topicStart new topic
> HV Script Thread, Discuss your creations. Includes guidelines and infos for script creation (2020-02-28 upd)

 
post Sep 12 2014, 07:22
Post #1647
Colman



Where is the loli?
*********
Group: Gold Star Club
Posts: 7,333
Joined: 15-November 10
Level 500 (Ponyslayer)


May I ask something very fundamental for scripting here? I sometimes confuse with the codes. (IMG:[invalid] style_emoticons/default/heh.gif)

BTW, I am just a beginner of browser script.

This post has been edited by Colman: Sep 12 2014, 07:22
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Sep 12 2014, 07:37
Post #1648
holy_demon



Osananajimi<3
*********
Group: Gold Star Club
Posts: 5,417
Joined: 2-April 10
Level 500 (Godslayer)


QUOTE(Colman @ Sep 12 2014, 15:22) *

May I ask something very fundamental for scripting here? I sometimes confuse with the codes. (IMG:[invalid] style_emoticons/default/heh.gif)

BTW, I am just a beginner of browser script.


Just ask =_=
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Sep 12 2014, 07:53
Post #1649
Usagi =



Veteran Poster
********
Group: Gold Star Club
Posts: 2,923
Joined: 29-October 13
Level 453 (Dovahkiin)


how would one do a console command where:

while ( console displays any error ){ reload webpage }
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Sep 12 2014, 08:08
Post #1650
holy_demon



Osananajimi<3
*********
Group: Gold Star Club
Posts: 5,417
Joined: 2-April 10
Level 500 (Godslayer)


QUOTE(LOL50015 @ Sep 12 2014, 15:53) *

how would one do a console command where:

while ( console displays any error ){ reload webpage }

userscripts don't have access to read/listen to the console/debugger object. You have to make it into an extension and explicitly give it access in manifest.json(on Chrome). No idea about Firefox

You will want to read these documentations if you still want to do it

[developer.chrome.com] https://developer.chrome.com/extensions/api_index
[developer.chrome.com] https://developer.chrome.com/devtools/docs/debugger-protocol

This post has been edited by holy_demon: Sep 12 2014, 08:25
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Sep 12 2014, 08:17
Post #1651
Usagi =



Veteran Poster
********
Group: Gold Star Club
Posts: 2,923
Joined: 29-October 13
Level 453 (Dovahkiin)


QUOTE(holy_demon @ Sep 12 2014, 14:08) *

userscripts don't have access to read/listen to the console/debugger object. You have to make it into an extension and explicitly give it access in manifest.json(on Chrome). No idea about Firefox


I meant inspect element > console tab

where you can type in stuff and it executes it like a userscript.

User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Sep 12 2014, 08:30
Post #1652
Dan31



Chilling around
********
Group: Members
Posts: 4,399
Joined: 26-March 12
Level 491 (Godslayer)


QUOTE(LOL50015 @ Sep 12 2014, 07:53) *

how would one do a console command where:

while ( console displays any error ){ reload webpage }

Wouldn't this be an infinite loop at the slightest error? It's not like errors magically fix themselves.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Sep 12 2014, 08:31
Post #1653
holy_demon



Osananajimi<3
*********
Group: Gold Star Club
Posts: 5,417
Joined: 2-April 10
Level 500 (Godslayer)


QUOTE(LOL50015 @ Sep 12 2014, 16:17) *

I meant inspect element > console tab

where you can type in stuff and it executes it like a userscript.


Yep, impossible with userscript. The context of userscript is only within the page. That windows outside the scope of userscript, you will need a context of an extension.

Or you can overwrite the console.log method and record the logs yourself, though I think you have to do it by html injection.

[stackoverflow.com] http://stackoverflow.com/questions/1984607...e-in-javascript

All advanced techniques (IMG:[invalid] style_emoticons/default/heh.gif)

This post has been edited by holy_demon: Sep 12 2014, 08:31
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Sep 12 2014, 08:38
Post #1654
Usagi =



Veteran Poster
********
Group: Gold Star Club
Posts: 2,923
Joined: 29-October 13
Level 453 (Dovahkiin)


Okay, find I'll explain my situation:

I'm trying to get this site, [simplyotaku.com] http://simplyotaku.com/ to display me pictures but the pictures won't show because they have a access denied error, but after enough reloads it shows me the pictures, so I reckon the ports are just congested. So I though of asking you guys for a console command so that it can reload until all the images finally show.

I know to reload is location.reload();
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Sep 12 2014, 08:47
Post #1655
holy_demon



Osananajimi<3
*********
Group: Gold Star Club
Posts: 5,417
Joined: 2-April 10
Level 500 (Godslayer)


QUOTE(LOL50015 @ Sep 12 2014, 16:38) *

Okay, find I'll explain my situation:

I'm trying to get this site, [simplyotaku.com] http://simplyotaku.com/ to display me pictures but the pictures won't show because they have a access denied error, but after enough reloads it shows me the pictures, so I reckon the ports are just congested. So I though of asking you guys for a console command so that it can reload until all the images finally show.

I know to reload is location.reload();


put this in an userscript. It won't loop in the console.

if (!document.querySelector("<put the selector of pictures/container here>") {
location.href="";
}

note 1: you might want a to setTimeout to not hog your bandwidth
note 2" location.reload is retardedly slow

This post has been edited by holy_demon: Sep 12 2014, 08:47
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Sep 12 2014, 12:33
Post #1656
djackallstar



ดีjackallstar
**********
Group: Gold Star Club
Posts: 8,221
Joined: 23-July 14
Level 500 (Godslayer)


Script Name
    Realtime Auction Countdown Timer
Description
    A script that embeds countdown timers in the title sections of auction threads in the WTS forum.
    Timers are updated every 60 seconds; you can change the value in the script.
    You can also change the height (default to 45 pixels) of the timer.
DemoDownload and InstallationChangelog
  • 2014/12/21 The script can now display a timer for a lottery thread as well.
  • 2014/09/12 Initial post.
[/list]Feedback
To report bugs, request features, or if you have any feedback, please PM me or reply to this thread.

This post has been edited by djackallstar: Dec 21 2014, 03:54
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Sep 12 2014, 13:05
Post #1657
djackallstar



ดีjackallstar
**********
Group: Gold Star Club
Posts: 8,221
Joined: 23-July 14
Level 500 (Godslayer)


QUOTE(holy_demon @ Sep 12 2014, 14:47) *

put this in an userscript. It won't loop in the console.
if (!document.querySelector("<put the selector of pictures/container here>") {
location.href="";
}
note 1: you might want a to setTimeout to not hog your bandwidth
note 2" location.reload is retardedly slow

Just reload the broken images:
if(!img_is_ok(img)) { img.src = img.src; }

As for the way to check whether an image is broken, you can:
var img_is_ok = function(img) {
if(img.readyState != 'complete') { return false; }
if(('naturalHeight' in img) && (img.naturalHeight + img.naturalWidth == 0)) { return false; }
if(img.width + img.height == 0) { return false; }
return true;

};


This post has been edited by djackallstar: Sep 12 2014, 13:08
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Sep 13 2014, 05:03
Post #1658
djackallstar



ดีjackallstar
**********
Group: Gold Star Club
Posts: 8,221
Joined: 23-July 14
Level 500 (Godslayer)


QUOTE(oohmrparis @ Jul 6 2014, 19:53) *

Script that displays the condition in equipment page.
[attachmentid=46151]
If equipment can repair, repair by right-clicking.
If you need confirmation dialog, erase the double slash of two places near the bottom of the code.
Scraps bug fixed.

Hi again!
Some player says repairing an equipment at some precentage (51~60 or 76~80) will save you come credits.
Can you add colors to condition% in different ranges?
For example:
163/320 (51%) => element.style.color = '#33FF33' (green, because 51 and 76 are the best timing to repair.)
176/320 (55%) => element.style.color = '#FFFF00' (yellow, because 52~60 and 77~80 are the second-best timing to repair.)
80/320 (25%) => element.style.color = '#FF0000' (red, because 0~50, 61~75, 81~99 are the worst timing to repiar.)

This post has been edited by djackallstar: Sep 13 2014, 18:35
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Sep 13 2014, 18:19
Post #1659
Usagi =



Veteran Poster
********
Group: Gold Star Club
Posts: 2,923
Joined: 29-October 13
Level 453 (Dovahkiin)


QUOTE(holydemon @ Sep 12 2014, 18:33) *

-snip-



QUOTE(djackallstar @ Sep 12 2014, 19:05) *

Just reload the broken images:
if(!img_is_ok(img)) { img.src = img.src; }

As for the way to check whether an image is broken, you can:
var img_is_ok = function(img) {
if(img.readyState != 'complete') { return false; }
if(('naturalHeight' in img) && (img.naturalHeight + img.naturalWidth == 0)) { return false; }
if(img.width + img.height == 0) { return false; }
return true;

};



thanks for the suggestions guys!

This post has been edited by LOL50015: Sep 13 2014, 18:19
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Sep 14 2014, 09:50
Post #1660
oohmrparis



We are ping-pong player
*****
Group: Gold Star Club
Posts: 524
Joined: 18-June 13
Level 500 (Ponyslayer)


QUOTE(djackallstar @ Sep 13 2014, 05:03) *

Hi again!
Some player says repairing an equipment at some precentage (51~60 or 76~80) will save you come credits.
Can you add colors to condition% in different ranges?
For example:
163/320 (51%) => element.style.color = '#33FF33' (green, because 51 and 76 are the best timing to repair.)
176/320 (55%) => element.style.color = '#FFFF00' (yellow, because 52~60 and 77~80 are the second-best timing to repair.)
80/320 (25%) => element.style.color = '#FF0000' (red, because 0~50, 61~75, 81~99 are the worst timing to repiar.)



I will implement in the next version it.
when 76 or 51, text color green.
when 77~80 or 52~55, text color blue.
other than black.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Sep 14 2014, 11:38
Post #1661
djackallstar



ดีjackallstar
**********
Group: Gold Star Club
Posts: 8,221
Joined: 23-July 14
Level 500 (Godslayer)


QUOTE(oohmrparis @ Sep 14 2014, 15:50) *

I will implement in the next version it.
when 76 or 51, text color green.
when 77~80 or 52~55, text color blue.
other than black.

52~55 -> 52~60?
And thanks, Looking forward to it! (IMG:[invalid] style_emoticons/default/smile.gif)
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Sep 14 2014, 12:44
Post #1662
oohmrparis



We are ping-pong player
*****
Group: Gold Star Club
Posts: 524
Joined: 18-June 13
Level 500 (Ponyslayer)


QUOTE(djackallstar @ Sep 14 2014, 11:38) *

52~55 -> 52~60?
And thanks, Looking forward to it! (IMG:[invalid] style_emoticons/default/smile.gif)

Why 52~60?
77~80 (+4), 52~60 (+9) -> 52~55 (+4)
I think the good in this. (IMG:[invalid] style_emoticons/default/rolleyes.gif)
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Sep 14 2014, 13:48
Post #1663
djackallstar



ดีjackallstar
**********
Group: Gold Star Club
Posts: 8,221
Joined: 23-July 14
Level 500 (Godslayer)


QUOTE(oohmrparis @ Sep 14 2014, 18:44) *

Why 52~60?
77~80 (+4), 52~60 (+9) -> 52~55 (+4)
I think the good in this. (IMG:[invalid] style_emoticons/default/rolleyes.gif)

var number_of_catalysts_needed = 0;
var repair_precents_per_catalyst = 0; // the bigger, the better; >=20 is good, <20 is bad.
for(var i=0; i<=100; i++)
{
number_of_catalysts_needed = (1+Math.floor((100-i)/25)); // http://ehwiki.org/wiki/repair#Repair_Costs
repair_precents_per_catalyst = (100-i)/number_of_catalysts_needed;
console.log("condition=" + i + "%, " + number_of_catalysts_needed + ", " + repair_precents_per_catalyst);

}

=== Output ===

condition=0%, 5, 20
condition=1%, 4, 24.75
condition=2%, 4, 24.5
condition=3%, 4, 24.25
condition=4%, 4, 24
condition=5%, 4, 23.75
condition=6%, 4, 23.5
condition=7%, 4, 23.25
condition=8%, 4, 23
condition=9%, 4, 22.75
condition=10%, 4, 22.5
condition=11%, 4, 22.25
condition=12%, 4, 22
condition=13%, 4, 21.75
condition=14%, 4, 21.5
condition=15%, 4, 21.25
condition=16%, 4, 21
condition=17%, 4, 20.75
condition=18%, 4, 20.5
condition=19%, 4, 20.25
condition=20%, 4, 20
condition=21%, 4, 19.75
condition=22%, 4, 19.5
condition=23%, 4, 19.25
condition=24%, 4, 19
condition=25%, 4, 18.75
condition=26%, 3, 24.666666666666668
condition=27%, 3, 24.333333333333332
condition=28%, 3, 24
condition=29%, 3, 23.666666666666668
condition=30%, 3, 23.333333333333332
condition=31%, 3, 23
condition=32%, 3, 22.666666666666668
condition=33%, 3, 22.333333333333332
condition=34%, 3, 22
condition=35%, 3, 21.666666666666668
condition=36%, 3, 21.333333333333332
condition=37%, 3, 21
condition=38%, 3, 20.666666666666668
condition=39%, 3, 20.333333333333332
condition=40%, 3, 20
condition=41%, 3, 19.666666666666668
condition=42%, 3, 19.333333333333332
condition=43%, 3, 19
condition=44%, 3, 18.666666666666668
condition=45%, 3, 18.333333333333332
condition=46%, 3, 18
condition=47%, 3, 17.666666666666668
condition=48%, 3, 17.333333333333332
condition=49%, 3, 17
condition=50%, 3, 16.666666666666668
condition=51%, 2, 24.5
condition=52%, 2, 24
condition=53%, 2, 23.5
condition=54%, 2, 23
condition=55%, 2, 22.5
condition=56%, 2, 22
condition=57%, 2, 21.5
condition=58%, 2, 21
condition=59%, 2, 20.5
condition=60%, 2, 20
condition=61%, 2, 19.5
condition=62%, 2, 19
condition=63%, 2, 18.5
condition=64%, 2, 18
condition=65%, 2, 17.5
condition=66%, 2, 17
condition=67%, 2, 16.5
condition=68%, 2, 16
condition=69%, 2, 15.5
condition=70%, 2, 15
condition=71%, 2, 14.5
condition=72%, 2, 14
condition=73%, 2, 13.5
condition=74%, 2, 13
condition=75%, 2, 12.5
condition=76%, 1, 24
condition=77%, 1, 23
condition=78%, 1, 22
condition=79%, 1, 21
condition=80%, 1, 20
condition=81%, 1, 19
condition=82%, 1, 18
condition=83%, 1, 17
condition=84%, 1, 16
condition=85%, 1, 15
condition=86%, 1, 14
condition=87%, 1, 13
condition=88%, 1, 12
condition=89%, 1, 11
condition=90%, 1, 10
condition=91%, 1, 9
condition=92%, 1, 8
condition=93%, 1, 7
condition=94%, 1, 6
condition=95%, 1, 5
condition=96%, 1, 4
condition=97%, 1, 3
condition=98%, 1, 2
condition=99%, 1, 1
condition=100%, 1, 0

51~60, 76~80 are the ranges where repair_precents_per_catalyst is big (>=20) (big = good).
So I think 51~60 and 76~80 is the timing to repair an equipment.
I only consider catalysts, and I ignore scraps, because scraps are cheap.

This post has been edited by djackallstar: Sep 14 2014, 16:34
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Sep 14 2014, 16:02
Post #1664
oohmrparis



We are ping-pong player
*****
Group: Gold Star Club
Posts: 524
Joined: 18-June 13
Level 500 (Ponyslayer)


okey.
76 or 51 is font color green.
77~80 or 52~60 is font color blue.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Sep 16 2014, 21:12
Post #1665
kserox



Poster Irregular
*****
Group: Catgirl Camarilla
Posts: 727
Joined: 26-December 10
Level 500 (Godslayer)


By the way, how do you people repair stuff using this script? By pressing RMB on item in equipment tab? It gives me only standart browser RMB menu (Back, Reload, Save As etc).
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Sep 16 2014, 23:19
Post #1666
Cleavs



A certain pervert. OT expert. Just dancing around in the game.
***********
Group: Gold Star Club
Posts: 24,317
Joined: 18-January 07
Level 500 (Ponyslayer)


QUOTE(treesloth16 @ Jul 7 2014, 23:12) *

It wont produce forum links for selected equips... I believe others have posted about this issue in the pinned shop helper thread also

QUOTE(LostLogia4 @ Jul 8 2014, 04:33) *

Just tested it with Firefox 30 with Greasemonkey and the tags is only shown in the equipment shop. The only other section where it works is in the defunct pre-patch forge section.
It's perilous to use the script there, so switched to HV Item manager for tagging purposes. Clearly some patching needs to be done to extend it's functionality to Inventory, Forge and Mooglemail section, where I'll REALLY need the tags to identify the to be-sent equip.

EDIT:Checked this reply from ctxl
Guess that'll take awhile... (IMG:[invalid] style_emoticons/default/heh.gif)

QUOTE(n125 @ Jul 8 2014, 10:39) *

Adding this to the Mini Shop Helper include list causes the script to partially function in the Enchant section of the Forge, which is a safe section and doesn't filter any equipment out. You can still tag and price equipment, but like the sloth said, you can't generate BBCode.

CODE
// @match          http://hentaiverse.org/?s=Forge&ss=en*


According to ctxl, we just have to wait a while.

don't know if it's already been solved (only saw these posts while searching for an update to hoverplay (IMG:[invalid] style_emoticons/default/duck.gif) ) but mini shop helper is still somehow working: it's possible to have at list the link from the equipment shop tab by inserting in the Raw JS BBCode Formatting (use at your own risk!) section the string:
CODE
"["+alleqdp[i].getAttribute("onmouseover").match(/equips.+/)[0].match(/\(.+\)/)[0].match(/\w+/g)[0]+"] - [URL="+getURL(alleqdp[i])+"]"+data.Info['Name']+"[/URL]"


the result is the following:
CODE
[37725195] - [URL=http://hentaiverse.org/pages/showequip.php?eid=37725195&key=71dddca25a]Superior Ethereal Axe of Slaughter[/URL]


so: [37725195] - Superior Ethereal Axe of Slaughter
User is offlineProfile CardPM
Go to the top of the page
+Quote Post


291 Pages V « < 82 83 84 85 > » 
Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 


Lo-Fi Version Time is now: 16th September 2025 - 03:25