Welcome Guest ( Log In | Register )

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

 
post Feb 4 2016, 12:53
Post #2567
boulay



Noob
********
Group: Gold Star Club
Posts: 2,675
Joined: 27-June 11
Level 500 (Godslayer)


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)
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Feb 4 2016, 17:46
Post #2568
f4tal



Veteran Poster
********
Group: Members
Posts: 2,662
Joined: 10-January 13
Level 416 (Godslayer)


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.899
With your script: 1,103 / 1.061 / 0.978 | Average: 1.047

I 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...


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

 
post Feb 4 2016, 18:39
Post #2569
boulay



Noob
********
Group: Gold Star Club
Posts: 2,675
Joined: 27-June 11
Level 500 (Godslayer)


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...
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Feb 4 2016, 18:57
Post #2570
f4tal



Veteran Poster
********
Group: Members
Posts: 2,662
Joined: 10-January 13
Level 416 (Godslayer)


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.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Feb 4 2016, 20:09
Post #2571
boulay



Noob
********
Group: Gold Star Club
Posts: 2,675
Joined: 27-June 11
Level 500 (Godslayer)


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 ^^
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Feb 4 2016, 21:04
Post #2572
f4tal



Veteran Poster
********
Group: Members
Posts: 2,662
Joined: 10-January 13
Level 416 (Godslayer)


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?
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Feb 4 2016, 21:55
Post #2573
boulay



Noob
********
Group: Gold Star Club
Posts: 2,675
Joined: 27-June 11
Level 500 (Godslayer)


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
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Feb 4 2016, 22:09
Post #2574
f4tal



Veteran Poster
********
Group: Members
Posts: 2,662
Joined: 10-January 13
Level 416 (Godslayer)


QUOTE
- display:none erases the targetted div
- display:hidden just hides it

oh! That makes sense. Thanks for explanation ^^
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Feb 4 2016, 22:13
Post #2575
simrock87



<('.'<) (>'.')> (^'.')>
*****
Group: Members
Posts: 647
Joined: 12-June 11
Level 399 (Godslayer)


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)
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Feb 4 2016, 23:00
Post #2576
boulay



Noob
********
Group: Gold Star Club
Posts: 2,675
Joined: 27-June 11
Level 500 (Godslayer)


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)
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Feb 4 2016, 23:04
Post #2577
mikotonaruto



Newcomer
**
Group: Gold Star Club
Posts: 99
Joined: 31-August 15
Level 329 (Godslayer)


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)
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Feb 5 2016, 00:20
Post #2578
Superlatanium



Dreaming of optimizing the system
**********
Group: Gold Star Club
Posts: 7,629
Joined: 27-November 13
Level 500 (Godslayer)


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
User is online!Profile CardPM
Go to the top of the page
+Quote Post

 
post Feb 5 2016, 00:39
Post #2579
tatarime



2016年12月208日
******
Group: Gold Star Club
Posts: 802
Joined: 23-June 10
Level 500 (Godslayer)


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:
  1. Check Box
  2. Give Crystal
  3. 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)
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Feb 5 2016, 01:02
Post #2580
simrock87



<('.'<) (>'.')> (^'.')>
*****
Group: Members
Posts: 647
Joined: 12-June 11
Level 399 (Godslayer)


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)
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Feb 5 2016, 01:17
Post #2581
tatarime



2016年12月208日
******
Group: Gold Star Club
Posts: 802
Joined: 23-June 10
Level 500 (Godslayer)


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
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Feb 5 2016, 02:35
Post #2582
FabulousCupcake



Casual Poster
****
Group: Gold Star Club
Posts: 495
Joined: 15-April 14
Level 451 (Dovahkiin)


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);
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Feb 5 2016, 03:02
Post #2583
simrock87



<('.'<) (>'.')> (^'.')>
*****
Group: Members
Posts: 647
Joined: 12-June 11
Level 399 (Godslayer)


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;
}
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Feb 5 2016, 03:08
Post #2584
FabulousCupcake



Casual Poster
****
Group: Gold Star Club
Posts: 495
Joined: 15-April 14
Level 451 (Dovahkiin)


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
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Feb 5 2016, 03:35
Post #2585
tatarime



2016年12月208日
******
Group: Gold Star Club
Posts: 802
Joined: 23-June 10
Level 500 (Godslayer)


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)
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Feb 5 2016, 03:39
Post #2586
simrock87



<('.'<) (>'.')> (^'.')>
*****
Group: Members
Posts: 647
Joined: 12-June 11
Level 399 (Godslayer)


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.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post


291 Pages V « < 128 129 130 131 > » 
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: 18th July 2025 - 12:35