Loading. Please Wait... 
 |
 |
 |
HV Script Thread, Discuss your creations. Includes guidelines and infos for script creation (2020-02-28 upd) |
|
Feb 4 2016, 12:53
|
boulay
Group: Gold Star Club
Posts: 2,675
Joined: 27-June 11

|
QUOTE(simrock87 @ Feb 3 2016, 10:15)  Except if your browser decides to throw endless loads (IMG:[ invalid] style_emoticons/default/happy.gif) I should have read more carefully (IMG:[ invalid] style_emoticons/default/dry.gif) FF did throw endless loads... QUOTE(tatarime @ Feb 4 2016, 03:58)  HV_SmartMonsterLab
This looks nice and very easy to use (o_o)b QUOTE(f4tal @ Feb 4 2016, 11:03)  And it is only for me, or tr/sec has a increased a little with this compact script?
I would like to know about that too. I made this css in hope to achieve that but my internet is suffering from chronical slowness. I can't see the difference for myself (IMG:[ invalid] style_emoticons/default/sleep.gif)
|
|
|
|
 |
|
Feb 4 2016, 17:46
|
f4tal
Group: Members
Posts: 2,662
Joined: 10-January 13

|
QUOTE I would like to know about that too. So, lets do my favorite thing - test some scripts! ^^ My opinion after a little testing marathon is... your script DO increase turn/sec a little, and can be using in increasing speed. So, how it was?I went onto bazarr and bought some random crude staff. [ s019.radikal.ru] (IMG:[s019.radikal.ru] http://s019.radikal.ru/i612/1602/41/8d95f6e4f7a0t.jpg) Then I entered Item World. I did SIX runs. Three without your battle Compact script and three with it. Conditions in every runs was like this: - Using only melee (no spells or skills allowed, even support one) - Items have been not used - Using numpad to hit enemies - Spirit not allowed - All scripts, except see below, were deactivated - Using only HV Counter Save (to check my speed at the end of the battle) and HV Stat Slim (to auto skip "victory-popup") - If RiddleMaster happens - do another run (I spend sometimes a 30 sec to answer this popup due my bad eyes and monitor >_>) - In every run I have 10 rounds Now... Result for three runs without your script like this: [ s018.radikal.ru] (IMG:[s018.radikal.ru] http://s018.radikal.ru/i521/1602/87/c55c3cfcb065t.jpg) Result for three runs with your script like this: [ s017.radikal.ru] (IMG:[s017.radikal.ru] http://s017.radikal.ru/i404/1602/f1/87b5533af7bdt.jpg) Let's do a little math:Without your script: 0,877 / 0.910 / 0.911 | Average: 0.899With your script: 1,103 / 1.061 / 0.978 | Average: 1.047I think this results are self-explanatory ^^ So for now I WILL use your script for speed up my battle. P.S. Of course, there some side-factors like latency, user-side problem, some browser-weirdness, e.t.c. so, my test maybe absolutely wrong...
|
|
|
|
 |
|
Feb 4 2016, 18:39
|
boulay
Group: Gold Star Club
Posts: 2,675
Joined: 27-June 11

|
QUOTE(f4tal @ Feb 4 2016, 16:46)  - snip -
P.S. Of course, there some side-factors like latency, user-side problem, some browser-weirdness, e.t.c. so, my test maybe absolutely wrong...
That's still good to know, thanks (IMG:[ invalid] style_emoticons/default/smile.gif) It may also be faster without the battle log...
|
|
|
Feb 4 2016, 18:57
|
f4tal
Group: Members
Posts: 2,662
Joined: 10-January 13

|
QUOTE It may also be faster without the battle log... Yeah, but now when I think about it - I dont remember any script that nullified battle log... The only script with same feature is realoder. In latest version there setting to disable battlelog. But, once again, I dont remember dedicated script to disable battlelog.
|
|
|
Feb 4 2016, 20:09
|
boulay
Group: Gold Star Club
Posts: 2,675
Joined: 27-June 11

|
QUOTE(f4tal @ Feb 4 2016, 17:57)  Yeah, but now when I think about it - I dont remember any script that nullified battle log... The only script with same feature is realoder. In latest version there setting to disable battlelog. But, once again, I dont remember dedicated script to disable battlelog.
I can do that for you with 1 line of css: CODE #togpane_log{display:none !important;} I didn't include this in battle compact since I like to see what I drop in battle ^^
|
|
|
|
 |
|
Feb 4 2016, 21:04
|
f4tal
Group: Members
Posts: 2,662
Joined: 10-January 13

|
QUOTE I can do that for you with 1 line of css: But... but... ohh... yeah... This is very easy solution. I am little surprised. I though about nullifying every line of log, but "hide the whole div" is way better solution. ^^ But do I understand right, that log still will be exist and technically would present onto battle screen, but just will be invisibly?
|
|
|
|
 |
|
Feb 4 2016, 21:55
|
boulay
Group: Gold Star Club
Posts: 2,675
Joined: 27-June 11

|
QUOTE(f4tal @ Feb 4 2016, 20:04)  But... but... ohh... yeah... This is very easy solution. I am little surprised. I though about nullifying every line of log, but "hide the whole div" is way better solution. ^^
But do I understand right, that log still will be exist and technically would present onto battle screen, but just will be invisibly?
To my understanding: - display:none erases the targetted div - display:hidden just hides it This post has been edited by boulay: Feb 4 2016, 21:56
|
|
|
Feb 4 2016, 22:09
|
f4tal
Group: Members
Posts: 2,662
Joined: 10-January 13

|
QUOTE - display:none erases the targetted div - display:hidden just hides it oh! That makes sense. Thanks for explanation ^^
|
|
|
Feb 4 2016, 22:13
|
simrock87
Group: Members
Posts: 647
Joined: 12-June 11

|
QUOTE(boulay @ Feb 4 2016, 19:55)  To my understanding: - display:none erases the targetted div - display:hidden just hides it
Technically ... first of all there is no "display: hidden", i guess you meant "visibility: hidden" (IMG:[ invalid] style_emoticons/default/happy.gif) If it still works, it's probably so common an error, that browsers just translate it in some way or other. Back to topic, "display: none" prevents rendering the element at all "visibility: hidden" renders the element but hides the content (you still get an empty box that takes up space)
|
|
|
|
 |
|
Feb 4 2016, 23:00
|
boulay
Group: Gold Star Club
Posts: 2,675
Joined: 27-June 11

|
QUOTE(simrock87 @ Feb 4 2016, 21:13)  Technically ... first of all there is no "display: hidden", i guess you meant "visibility: hidden" (IMG:[ invalid] style_emoticons/default/happy.gif) If it still works, it's probably so common an error, that browsers just translate it in some way or other. Back to topic, "display: none" prevents rendering the element at all "visibility: hidden" renders the element but hides the content (you still get an empty box that takes up space) Mmmh, yeah. I mixed up things (IMG:[ invalid] style_emoticons/default/sleep.gif)
|
|
|
|
 |
|
Feb 4 2016, 23:04
|
mikotonaruto
Newcomer
  Group: Gold Star Club
Posts: 99
Joined: 31-August 15

|
QUOTE(Void Domain @ Jan 28 2016, 14:10)  Firefox will run faster in hv without stylish, I can confirm that.
newbie here (IMG:[ invalid] style_emoticons/default/smile.gif) , please tell me how to use css file on firefox without stylish addon, I will really appreciate it (IMG:[ invalid] style_emoticons/default/smile.gif)
|
|
|
|
 |
|
Feb 5 2016, 00:20
|
Superlatanium
Group: Gold Star Club
Posts: 7,629
Joined: 27-November 13

|
QUOTE(mikotonaruto @ Feb 4 2016, 21:04)  newbie here (IMG:[ invalid] style_emoticons/default/smile.gif) , please tell me how to use css file on firefox without stylish addon, I will really appreciate it (IMG:[ invalid] style_emoticons/default/smile.gif) In a userscript, what I do is something like CODE var cssSource = `
body {background:#DFEBED; font-family:arial;} .thumbContainer {border:2px solid black; position:absolute;} button {padding:0; margin-left:15px; margin-right:15px;}
`; var cssStyle = document.head.appendChild(document.createElement('style')); cssSource.split('\n').forEach(function(rule){ if (rule && rule.replace(/\s*/g, '').length) cssStyle.sheet.insertRule(rule, 0); }); (or just replace the cssSource text with the CSS you want to use) Or is there a better way? I wouldn't know. Edit: Well of course you could repeat many cssStyle.sheet.insertRule('body {background:#DFEBED; font-family:arial;}', 0); but that looks horrible if you have more than a few rules. This post has been edited by Superlatanium: Feb 5 2016, 00:33
|
|
|
|
 |
|
Feb 5 2016, 00:39
|
tatarime
Group: Gold Star Club
Posts: 802
Joined: 23-June 10

|
Thank you for using my script. QUOTE(f4tal @ Feb 4 2016, 12:03)  THATS BADASS MONSTER LAB! O_O My monsterLab not so good, as your v_v Works great! And I like that win-8 aestheticslim mode You know what even can be better? Support of Drag'n'drop like in Mini MonsterLab Additions script? =)
D&D is good idea! I have plans for the next update: - Check Box
- Give Crystal
- Manual Sort Mode (D&D)
And your Scripts Compendium is a very great work! I'm rooting for you. (IMG:[ invalid] style_emoticons/default/smile.gif)
|
|
|
|
 |
|
Feb 5 2016, 01:02
|
simrock87
Group: Members
Posts: 647
Joined: 12-June 11

|
QUOTE(Superlatanium @ Feb 4 2016, 22:20)  In a userscript, what I do is something like CODE var cssSource = `
body {background:#DFEBED; font-family:arial;} .thumbContainer {border:2px solid black; position:absolute;} button {padding:0; margin-left:15px; margin-right:15px;}
`; var cssStyle = document.head.appendChild(document.createElement('style')); cssSource.split('\n').forEach(function(rule){ if (rule && rule.replace(/\s*/g, '').length) cssStyle.sheet.insertRule(rule, 0); }); (or just replace the cssSource text with the CSS you want to use) Or is there a better way? I wouldn't know. Edit: Well of course you could repeat many cssStyle.sheet.insertRule('body {background:#DFEBED; font-family:arial;}', 0); but that looks horrible if you have more than a few rules. Instead of CODE cssSource.split('\n').forEach(function(rule){ if (rule && rule.replace(/\s*/g, '').length) cssStyle.sheet.insertRule(rule, 0); }); Why don't you just use CODE cssStyle.innerHTML = cssSource; Seems vastly easier than looping and regexing. At least if you have your style in one String. Also probably faster than the regex replace and, note i haven't tested this, i would guess that each insertRule() may trigger a rerender of the page (IMG:[ invalid] style_emoticons/default/biggrin.gif)
|
|
|
|
 |
|
Feb 5 2016, 01:17
|
tatarime
Group: Gold Star Club
Posts: 802
Joined: 23-June 10

|
QUOTE(Superlatanium @ Feb 5 2016, 00:20)  In a userscript, what I do is something like Or is there a better way? I wouldn't know.
QUOTE(simrock87 @ Feb 5 2016, 01:02)  cssStyle.innerHTML = cssSource;
Oh, I didn't know `(Template literal). I use css in SmartMonsterLab like this: CODE var d = document; var css = d.createElement("style"); css.textContent = ["#cfg_back_sml {", "position: fixed;", "width: 100%;", "height: 100%;", "}"].join("");
I think textContent is faster then innerHTML. node.property = hoge; ... appendChild(node); is faster then appendChild(node); ... node.property = hoge; And if you use "@run-at document-start" in Chrome/Iron, "head" will return undefined. (IMG:[ invalid] style_emoticons/default/sad.gif) CODE if (d.head) d.head.appendChild(css); else d.lastChild.appendChild(css); I use this way. (IMG:[ invalid] style_emoticons/default/smile.gif) This post has been edited by tatarime: Feb 5 2016, 01:20
|
|
|
|
 |
|
Feb 5 2016, 02:35
|
FabulousCupcake
Group: Gold Star Club
Posts: 495
Joined: 15-April 14

|
QUOTE Oh, I didn't know `(Template literal). `` allows multi line strings. It also allows inserting variables in it with ${var}, e.g.: CODE foo = 'bar'; baz = `${foo} bar`; // "bar bar" Why not useGM_addStyle? CODE // @grant GM_addStyle var css = ` some { th: ing; } `;
GM_addStyle(css);
|
|
|
Feb 5 2016, 03:02
|
simrock87
Group: Members
Posts: 647
Joined: 12-June 11

|
QUOTE(FabulousCupcake @ Feb 5 2016, 00:35)  Why not useGM_addStyle? CODE // @grant GM_addStyle var css = ` some { th: ing; } `;
GM_addStyle(css);
a ) using GreaseMonkey requires GreaseMonkey b ) GM_addStyle resolves to CODE function GM_addStyle(doc, css) { var head = doc.getElementsByTagName("head")[0]; if (head) { var style = doc.createElement("style"); style.textContent = css; style.type = "text/css"; head.appendChild(style); return style; } return null; }
|
|
|
Feb 5 2016, 03:08
|
FabulousCupcake
Group: Gold Star Club
Posts: 495
Joined: 15-April 14

|
GM_addStyle works in Tampermonkey. If you're not using that or greasemonkey, I don't know what you're using unsigned chrome extension?
This post has been edited by FabulousCupcake: Feb 5 2016, 03:08
|
|
|
Feb 5 2016, 03:35
|
tatarime
Group: Gold Star Club
Posts: 802
Joined: 23-June 10

|
QUOTE(FabulousCupcake @ Feb 5 2016, 02:35)  `` allows multi line strings. It also allows inserting variables in it with ${var}, e.g.: Why not useGM_addStyle?
Thank you! I don't like GM function... Previously, GM_setValue troubled me in Chrome (now I use localStorage). But I know that GM_addStyle works in unsigned Chrome extension. (IMG:[ invalid] style_emoticons/default/smile.gif)
|
|
|
|
 |
|
Feb 5 2016, 03:39
|
simrock87
Group: Members
Posts: 647
Joined: 12-June 11

|
QUOTE(FabulousCupcake @ Feb 5 2016, 01:08)  GM_addStyle works in Tampermonkey. If you're not using that or greasemonkey, I don't know what you're using unsigned chrome extension?
Not even that, you can just directly drag 'n' drop user scripts into chrome if they're written correctly (IMG:[ invalid] style_emoticons/default/happy.gif) That saves you from running around with an additional 400K of script from GM/TM. Granted, since middle of last year there was a patch that deletes all extensions not from chrome store, but HV actually runs better on old versions anyway, at least in regards to eye cancer through flickering.
|
|
|
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:
|
 |
 |
 |
|
|
|