Welcome Guest ( Log In | Register )

291 Pages V « < 259 260 261 262 263 > »   
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 26 2017, 13:23
Post #5201
Noni



Hataraku Noni-sama
***********
Group: Catgirl Camarilla
Posts: 12,924
Joined: 19-February 16
Level 500 (Ponyslayer)


QUOTE(f4tal @ Sep 26 2017, 12:12) *

I have an idea that Aardwark uses some sort of extension for browser like proxy and may accidentally copy its information in the code.
For example, I am using friGate proxy for Chrome. If I would open the proxy settings and will press ctrl+a at the page with script code - I will select everything on the screen AND some friGate text.
Attached Image

Then, if I would paste that data in TamperMoney - I will paste data from friGate extension also, right at the end.
Attached Image

That sounds suspiciously like this... (IMG:[invalid] style_emoticons/default/wink.gif)

I noticed that if you open the script link you get a new browser tab with the script. But as I was running 'random encounter script' I get the timer until next RE as well in that tab. When I select all and then copy paste, the timer texts show up at the end of the script. Probably unrelated...
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Sep 26 2017, 13:37
Post #5202
f4tal



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


QUOTE
Probably unrelated...

Related and very much. =)
Aardwark said he uses:
QUOTE
Chrome latest version, hentaiverse normal, 1.0.3.
Scripts: Monsterbate and Random Encounter, both working
HVToolbox doesn't appear at all.

So, yes, it is very possible that he accidentally (not his fault at all) copied data from Random Encounter script right to the end of the script.

Thank you for hint, DJNoni =)

This post has been edited by f4tal: Sep 26 2017, 13:37
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Sep 26 2017, 13:54
Post #5203
Aardwark



Casual Poster
***
Group: Members
Posts: 223
Joined: 11-May 14
Level 381 (Dovahkiin)


QUOTE(f4tal @ Sep 26 2017, 13:37) *

Related and very much. =)
Aardwark said he uses:

So, yes, it is very possible that he accidentally (not his fault at all) copied data from Random Encounter script right to the end of the script.

Thank you for hint, DJNoni =)

Thanks man for new version, but it still don't work ;(
CODE

VM79:62 Syntax error @ "HVtoolBox 1.0.4"!
##########################
JSHINT output:
script: (W041) Use '===' to compare with '' on line: 352 at character: 73
script: (W061) eval can be harmful on line: 1624 at character: 34
script: (W030) Expected an assignment or function call and instead saw an expression on line: 2852 at character: 1
script: (E058) Missing semicolon on line: 2852 at character: 3
script: (E041) Unrecoverable syntax error. (100% scanned) on line: 2852 at character: 1
##########################

SyntaxError: Unexpected token :
    at eval (<anonymous>)
    at <anonymous>:2:479
    at Object.c [as F_c] (<anonymous>:2:324)
    at Object.E_u (<anonymous>:3:143)
    at q (eval at exec_fn (:2:27), <anonymous>:63:97)
    at ha (eval at exec_fn (:2:27), <anonymous>:61:367)
    at Object.create (eval at exec_fn (:2:27), <anonymous>:70:259)
    at f (eval at exec_fn (:2:27), <anonymous>:15:237)
(anonymous) @ VM79:62
VM79:62 Uncaught SyntaxError: Unexpected token :
    at eval (<anonymous>)
    at <anonymous>:2:479
    at Object.c [as F_c] (<anonymous>:2:324)
    at Object.E_u (<anonymous>:3:143)
    at q (eval at exec_fn (:2:27), <anonymous>:63:97)
    at ha (eval at exec_fn (:2:27), <anonymous>:61:367)
    at Object.create (eval at exec_fn (:2:27), <anonymous>:70:259)
    at f (eval at exec_fn (:2:27), <anonymous>:15:237)
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Sep 26 2017, 13:55
Post #5204
f4tal



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


QUOTE
Thanks man for new version, but it still don't work ;(

Read, please, these three posts:
https://forums.e-hentai.org/index.php?s=&am...t&p=4958737
https://forums.e-hentai.org/index.php?s=&am...t&p=4958768
https://forums.e-hentai.org/index.php?s=&am...t&p=4958782

Check what you have at the end of the script.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Sep 26 2017, 14:22
Post #5205
Aardwark



Casual Poster
***
Group: Members
Posts: 223
Joined: 11-May 14
Level 381 (Dovahkiin)


QUOTE(f4tal @ Sep 26 2017, 13:55) *

Thanks man, its working now!
Somehow copied
30:55, re_cnt=11
at the end of script.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Sep 26 2017, 14:28
Post #5206
f4tal



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


QUOTE
Thanks man, its working now!
Somehow copied
30:55, re_cnt=11
at the end of script.

Good.
Thanks, DJNoni, once again (IMG:[invalid] style_emoticons/default/wink.gif)
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Sep 27 2017, 15:50
Post #5207
Juggernaut Santa



Living in HV 0.83 until Tenboro adds the Tower to Persistent
***********
Group: Gold Star Club
Posts: 11,129
Joined: 26-April 12
Level 500 (Ponyslayer)


If there is something I don't like of the new scripts that are coming after the "breaking patch" is their lack of support of the base font.

Older scripts were always compatible with the base font, newer ones are popping up every second and/or glitching.

I understand that most people prefer plain small book-looking font on HV, but it's not like someone would ever support, for example, for a font with symbols and shapes instead of letters (check windings, it's a base font on windows), just the goddamn freaking base font, that everyone can have, that does not require installation, that is default in the game code.

(Don't tell me that I'm the dumb one for using base font, or don't even fucking tell me that it's slower, because for anyone with at least 1kb/s of speed, it's not slower)

Almost every script that does some sort of text reading/analysis from the pages is fucking broken.
The percentile ranges script is broken, an useful one (even the inline difficulty one, if only I'd ever use that).

(What was wrong in the older equipment comparison script? Only a compatibility fix for the new links was necessary, not a complete rewrite of the code).

Hmpf.

This post has been edited by End Of All Hope: Sep 27 2017, 15:51
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Sep 27 2017, 16:15
Post #5208
f4tal



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


QUOTE
If there is something I don't like of the new scripts that are coming after the "breaking patch" is their lack of support of the base font.

Let me quote Superlatanium here:

QUOTE
A good, ordinary font like Arial:
CODE
<td><div class="fc4 fal fcb" style="width:100px"><div>Intelligence</div></div></td>Looks OK enough, right?


But the bad "default" font breaks many things, and you can probably see why:
CODE
<td><div class="fl f4b" style="width:100px"><div class="c5i"></div><div class="c5n"></div><div class="c5t"></div><div class="c5e"></div><div class="c5l"></div><div class="c5l"></div><div class="c5i"></div><div class="c5g"></div><div class="c5e"></div><div class="c5n"></div><div class="c5c"></div><div class="c5e"></div></div></td>

Gross. Yes, those two code segments display the exact same section of the page.

Coders just don't want to put themselves into troubles with parsing these "c5i", "c5n", "c5t", "c5e" madness. =)

QUOTE
Older scripts were always compatible with the base font, newer ones are popping up every second and/or glitching.

Well, if script have not to parse the text from the page - then it will work with any font. For example - Random Encounter Timer.

QUOTE
(Don't tell me that I'm the dumb one for using base font, or don't even fucking tell me that it's slower, because for anyone with at least 1kb/s of speed, it's not slower)

Rendering of the page in the browser (how fast page is constructed for you) will be slower with custom font - no doubts here.
On other hand, with powerful PC and modern browser, one may not find any differences. On handheld devices one still may see the differences in rendering.

QUOTE
(What was wrong in the older equipment comparison script? Only a compatibility fix for the new links was necessary, not a complete rewrite of the code).

I have checked its code - understood nothing (IMG:[invalid] style_emoticons/default/heh.gif)
Maybe one day I will fix it... No promises here.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Sep 27 2017, 17:23
Post #5209
Scremaz



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


QUOTE(f4tal @ Sep 27 2017, 16:15) *

I have checked its code - understood nothing (IMG:[invalid] style_emoticons/default/heh.gif)
Maybe one day I will fix it... No promises here.

the one that was posted yesterday? i understood a thing or two, but not everything. surely the forge upgrade thing needs to be reviewed
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Sep 27 2017, 17:45
Post #5210
f4tal



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


QUOTE
the one that was posted yesterday? i understood a thing or two, but not everything. surely the forge upgrade thing needs to be reviewed


Yes, that one.

I have managed to understand how it works, but haven't dig deeply.
Script, overall, looks and works fine for me, don't know about forge-part.
Attached Image

My problem is that I am more imperative-programming-type-of-guy - I prefer loops, conditions, objects, hashmaps, etc. However that script build more in functional-programming style with intersections, intercourses, prototypes, classes, etc.
Attached Image
I just don't *feel* such way of coding, but have noting against it - different paradigm just is. =)

Speaking of which, why does that script has two databases for stats from wiki?
CODE
var NEW_DATA_DATE = '20 December 2016';
var OLD_DATA_DATE = '21 January 2015';

What happened between these two dates and why one may prefer the using of old one?
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Sep 27 2017, 17:56
Post #5211
Scremaz



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


Speaking of which, why does that script has two databases for stats from wiki?
CODE
var NEW_DATA_DATE = '20 December 2016';
var OLD_DATA_DATE = '21 January 2015';

What happened between these two dates and why one may prefer the using of old one?
[/quote]
are you actually asking what happened within two years? (IMG:[invalid] style_emoticons/default/heh.gif)

if i have to guess, i'd say the new ranges. patch 0.82 hit on 17/05/2015 (so prior to that there were old ranges). not sure whether to pick exactly January though.

as for december 2016, it was halfway between 0.84 and 0.85. probably a period in which we thought ranges were discovered with a certain precision...
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Sep 27 2017, 18:02
Post #5212
f4tal



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


QUOTE
are you actually asking what happened within two years?

Well, I thought you know everything (IMG:[invalid] style_emoticons/default/heh.gif)
QUOTE
not sure whether to pick exactly January though.

That what bothers me too. No like I want to remove that data (why not, btw?), but just wondering what is the reason why one may use two and half year old data? (IMG:[invalid] style_emoticons/default/unsure.gif)
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Sep 27 2017, 18:29
Post #5213
Juggernaut Santa



Living in HV 0.83 until Tenboro adds the Tower to Persistent
***********
Group: Gold Star Club
Posts: 11,129
Joined: 26-April 12
Level 500 (Ponyslayer)


Bah...

Anyway, just because someone brought up the random encounter script.

This is the one I'm currently using, fixed by gianfrix ages ago, still working in 0.85, broken partially after some mid-patch update a week after 0.85
Here: https://forums.e-hentai.org/index.php?s=&am...t&p=4741026


I noted yesterday that when I said, time ago, that my version was bugged somehow, hc_br made an alternative version.
Here: https://forums.e-hentai.org/index.php?s=&am...t&p=4901353
I tried it, and now I have to choose between different issues of each one (IMG:[invalid] style_emoticons/default/duck.gif)

Known issues of gianfrix's fix:
- the script does not store the links of the previous encounters, aka if I refresh by mistake the page, I lose the RE
- as a consequence of the not storing, re_cnt is always = 0

Known issues of hc_br version
- the script shows the timer in too many pages, like galleries, gallery tools, basically every link containing "e-hentai.org", that is not the right behaviour, the only places where it should show should be are the forum and the news page
- the script does not show the box under the banner with the re_cnt and the timer in the news page, the box appears only once the RE toggles
- the script lists the done random encounters of the day on the left corner of the news page, and the "L" key hides/shows that list, but the list is shown by default instead of hidden, so after every reload it pops up again, and since this timer's font is bigger, is quite annoying
- the script reloads correctly the encounters after 30 minutes from the previous, but does not do the dawn reload at 12 AM UTC, but only when the previous timer hits 00:00 for the first time after 12 AM UTC (don't take this for granted, it failed me dawn one time, I don't have any more records of this issue), and that's not the correct behaviour
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Sep 27 2017, 18:39
Post #5214
f4tal



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


QUOTE
- the script shows the timer in too many pages, like galleries, gallery tools, basically every link containing "e-hentai.org", that is not the right behaviour, the only places where it should show should be are the forum and the news page

What is meta-data of the script? Every custom script has a block of code at the top that looks like this:
CODE
// ==UserScript==
// @name         HVtoolBox 1.1.0
// @namespace    hentaiverse.org
// @description  Multi-bazaaring, salvaging, repairing, moogling, filter, tweaks and extra features. Based on holy_demon's Item Manager script and Superlatanium's Percentile Ranges script.
// @match        *://*.hentaiverse.org/*
// @match        *://e-hentai.org/news.php
// @start-at     document-end
// @version      1.1.0
// @grant        none
// @author       f4tal (forums.e-hentai.org/index.php?showuser=1237490)
// ==/UserScript==

See this 'match' (or 'include') lines? You can edit them to configure where (at what pages) script should start working =)

This post has been edited by f4tal: Sep 27 2017, 18:40
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Sep 27 2017, 18:48
Post #5215
Draw99Gray



Playing FGO
*****
Group: Members
Posts: 734
Joined: 10-January 16
Level 476 (Dovahkiin)


QUOTE(End Of All Hope @ Sep 27 2017, 13:29) *


Known issues of hc_br version
- the script shows the timer in too many pages, like galleries, gallery tools, basically every link containing "e-hentai.org", that is not the right behaviour, the only places where it should show should be are the forum and the news page

Modify the @include like this

CODE
// @include         https://e-hentai.org/news.php
// @include         https://forums.e-hentai.org/*


This post has been edited by Draw99Gray: Sep 27 2017, 18:52
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Sep 27 2017, 18:50
Post #5216
Juggernaut Santa



Living in HV 0.83 until Tenboro adds the Tower to Persistent
***********
Group: Gold Star Club
Posts: 11,129
Joined: 26-April 12
Level 500 (Ponyslayer)


QUOTE(f4tal @ Sep 27 2017, 18:39) *



Right, that. But it's still slightly worse than the half functioning one.

I have 0 knowledge in javascript, but I think it would require less work to fix the older one allowing it to store again the data of the past encounters, thus upgrading re_cnt and showing always the box with the expired link until you manually reload, this way you can know when you already reloaded the page avoiding the script beeping (and alerting, bringing the tab in the foreground forcibly) you when you still have more than 30 minutes to clear the next one.

The other one would require an edit for the list, an edit for the pages, an edit for the timer box, and an (eventual, if the problem is verified) edit for the correct dawn reload.

This post has been edited by End Of All Hope: Sep 27 2017, 18:51
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Sep 27 2017, 18:55
Post #5217
ALL_MIGHT



Becoming addicted to LN and WN
*******
Group: Gold Star Club
Posts: 1,548
Joined: 14-October 16
Level 460 (Godslayer)


QUOTE(End Of All Hope @ Sep 27 2017, 21:59) *

Known issues of gianfrix's fix:
- the script does not store the links of the previous encounters, aka if I refresh by mistake the page, I lose the RE
- as a consequence of the not storing, re_cnt is always = 0

I am also using it .(Because it just works smoothly without issues).

So, Could someone please work on these two issues and edit it.
Thanks
(IMG:[invalid] style_emoticons/default/biggrin.gif)
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Sep 27 2017, 19:02
Post #5218
Draw99Gray



Playing FGO
*****
Group: Members
Posts: 734
Joined: 10-January 16
Level 476 (Dovahkiin)


I'm using this one, it seems the same as yours
CODE
// ==UserScript==
// @name            Countdown Timer for the Random Encounter Event on E-Hentai
// @description     Adds a countdown timer for the Random Encounter event on E-Hentai.org and its subdomains.
// @include         https://e-hentai.org/news.php
// @include         http://*.e-hentai.org/*
// @include         https://*.e-hentai.org/*
// ==/UserScript==

var wnd = window
var doc = wnd.document
var loc = location
var href = loc.href

if(!document.querySelector('*[name="ipb_login_submit"]') && /(\.e-hentai\.org\/)|(^e-hentai.org\/)/.test(loc.hostname+'/') && !/\/palette\.html?\b/.test(href) && !doc.getElementById('countdown_timer')) {
    var get_cookie = function(k) {
        var cookies = doc.cookie.split('; ')
        for(var i=cookies.length-1; i>=0; i--) { if(new RegExp(k+'=').test(cookies[i])) { return unescape(cookies[i].substring(k.length+1)) } }
        return null
    }
    var set_cookie = function(k, v) { doc.cookie = k + '=' + escape(v) + '; expires=Fri, 31 Dec 9999 23:59:59 GMT; domain=.e-hentai.org; path=/;' }

    if(!get_cookie('event')) { console.log('The "event" cookie does not exist or is invalid.'); throw 'exit' }
    if(!get_cookie('re_cnt')) { set_cookie('re_cnt', 0) }
    if(!get_cookie('re_lst')) { set_cookie('re_lst', '[]') }

    var timer_box = doc.createElement('DIV')
    timer_box.id = 'countdown_timer'
    timer_box.onclick = function() { if(/\bReady\b/i.test(this.textContent)) { wnd.open('https://e-hentai.org/news.php', href=='https://e-hentai.org/news.php'?'_self':'_blank') } }

    var toggle_re_lst = function() {
        //alert(get_cookie('re_lst'))
        var re_lst_box = doc.getElementById('re_lst_box')
        if(re_lst_box) { re_lst_box.parentNode.removeChild(re_lst_box); return }
        re_lst_box = doc.createElement('DIV')
        re_lst_box.id = 're_lst_box'
        re_lst_box.style.cssText = 'top:15px; right:0px; position:fixed; z-index:2147483647; background:rgba(242, 239, 223,1); color:#ff0000;'
        setTimeout(function() { re_lst_box.style.cssText = 'top:15px; right:0px; position:fixed; z-index:2147483647; background:rgba(242, 239, 223,0.5); color:#ff0000;' }, 3000)
        re_lst_box.innerHTML = '[List of RE Events Occurred Today]<BR>'
        re_lst_box.onmouseover = function () {
            this.style.cssText = 'top:15px; right:0px; position:fixed; z-index:2147483647; background:rgba(242, 239, 223,1); color:#ff0000;'
        }
        re_lst_box.onmouseout = function () {
            this.style.cssText = 'top:15px; right:0px; position:fixed; z-index:2147483647; background:rgba(242, 239, 223,0.5); color:#ff0000;'
        }

        var decode_hv_b64 = function(e) {
            var a = doc.createElement('A')
            a.href = 'http://hentaiverse.org/?s=Battle&ss=ba&encounter=' + e
            a.target = '_blank'
            a.text = (i+1) + '. '
            a.style.cssText = 'color:#ff0000'
            var d = atob(e)
            var m = /([^-]+?)-([^-]+?)-([^-]+)/.exec(d)
            if(m == null) { return a }
            var uid = m[1]
            var epoch = m[2]
            var hash = m[3]
            var da = new Date()
            da.setTime(parseInt(epoch)*1000)
            da = da.toLocaleTimeString()
            a.text = a.text + da
            return a
        }
        var re_lst = JSON.parse(get_cookie('re_lst'))
        if(re_lst) {
            for(var i=0, len=re_lst.length; i<len; i++) {
                var a = decode_hv_b64(re_lst[i])
                if(i != 0) { re_lst_box.appendChild(doc.createElement('BR')) }
                re_lst_box.appendChild(a)
            }
            doc.body.appendChild(re_lst_box)
        }
    }
    addEventListener('keydown', function(evt) { if((evt.target.tagName!='INPUT') && (evt.target.tagName!='TEXTAREA') && (evt.keyCode == 76)) { toggle_re_lst() } }, false)

    var newshead = doc.getElementById('newsinner')
    if(newshead && /\/e-hentai\./.test(href)) {
        timer_box.style.cssText = 'display: inline-block; background: rgb(242, 239, 223); border: 1px solid rgb(92, 13, 18); color:#ff0000; padding:5px; margin-top:5px;'
        newshead = doc.getElementById('nb')
        newshead.appendChild(doc.createElement('DIV')).appendChild(timer_box)
    } else {
        timer_box.style.cssText = 'line-height:15px; top:0px; right:0px; position:fixed; z-index:2147483647; background: rgba(242, 239, 223, 0.5); color:#ff0000;'
        doc.body.appendChild(timer_box)
    }

    var update_timer = function() {
        if(href == 'https://e-hentai.org/news.php') {
            var da = new Date()
            if((da.getUTCHours()==0) && (da.getUTCMinutes()==0) && (da.getUTCSeconds()<=10)) {
                if(!/^Your IP.*banned/i.test(doc.body.textContent)) {
                    setTimeout(function() {loc.reload()}, 10000)
                }
            }
        }
        var now = Math.floor(new Date().getTime()/1000)
        var diff = parseInt(get_cookie('event')) + 1800 - now
        if(isNaN(diff)) { setTimeout(function() {loc.reload()}, 60000); return }
        if(diff <= 0) {
            timer_box.textContent = 'Ready! re_cnt=' + get_cookie('re_cnt')
            if(href == 'https://e-hentai.org/news.php') {
                if(/^Your IP.*banned/i.test(doc.body.textContent)) {}
                else if(/The site is currently in Read Only\/Failover Mode/i.test(doc.documentElement.innerHTML)) { setTimeout(function() {loc.reload()}, 60000) }
                else { loc.reload() }
                return
            }
        } else {
            var mm = Math.floor(diff / 60) + ''
            mm = (mm.length >= 2 ? mm : '0' + mm)
            var ss = Math.floor(diff % 60) + ''
            ss = (ss.length >= 2 ? ss : '0' + ss)
            timer_box.textContent = mm + ':' + ss + ', re_cnt=' + get_cookie('re_cnt')
            if( (mm == '00') || ((mm == '01') && (ss == '00')) ) {
                try {
                    if(doc.getElementById('eventpane').getElementsByTagName('div')[1].getElementsByTagName('a')[0].textContent != 'HentaiVerse') {
                        if(!document.getElementById('re_snd')) {
                            var audio = new Audio('http://www.freesound.org/data/previews/234/234524_4019029-lq.mp3')
                            audio.id = 're_snd'
                            audio.volume = 1
                            audio.loop = true
                            audio.play()
                            document.body.appendChild(audio)
                        }
                        if(/50|40|30|20|10|05|00/.test(ss)) { alert('Random Encounter') }
                    }
                    else {
                        if(document.getElementById('re_snd')) {
                            document.getElementById('re_snd').parentNode.removeChild(document.getElementById('re_snd'))
                        }
                    }
                } catch(e) {}
            }
        }
        setTimeout(update_timer, 1000)
    }
    update_timer()

    var eventpane = doc.getElementById('eventpane')
    if(eventpane != null) {
        var re_evt = eventpane.querySelector('a[onclick*="http://hentaiverse.org/"]')
        //var re_evt = eventpane.getElementsByTagName('div')[1].getElementsByTagName('a')[0]
        if(re_evt) {
            var hv_lnk = ''
            if((/^http:\/\//.test(re_evt.href)) && (!/#/.test(re_evt.href))) { hv_lnk = re_evt.href }
            else {
                hv_lnk = /.*window\.open\(['"]?([^'"]+)['"]?/.exec(re_evt.onclick.toString().split('\n').join(''))
                if(hv_lnk) { hv_lnk = hv_lnk[1] }
            }
            if(hv_lnk) {
                hv_b64 = hv_lnk.replace(/.+?&encounter=([^&]*).*/, '$1') // the base64 encoded part
                var re_lst = JSON.parse(get_cookie('re_lst'))
                if((!re_lst) || (re_lst.length == 0)) { re_lst = [] }
                if(re_lst.indexOf(hv_b64) == -1) { re_lst.push(hv_b64) }
                re_lst = JSON.stringify(re_lst, null, ' ')
                set_cookie('re_lst', re_lst)
            }
            else {
                console.log('Error: There is a random encounter event but the HentaiVerse link cannot be found.')
                throw 'exit'
            }
            re_evt.addEventListener('click', function() {
                eventpane.style.display = 'block'
                if(re_evt.text != 'HentaiVerse') { set_cookie('re_cnt', parseInt(get_cookie('re_cnt'))+1) }
                re_evt.text = 'HentaiVerse'
            }, false)
        }
        else if(/\bdawn\b/i.test(eventpane.textContent)) {
            set_cookie('re_cnt', 0)
            set_cookie('re_lst', '[]')
        }
    }
}

If you don't reload the page, 1 minute before the next battle it will start beeping and bringing the tab to the screen every 10 seconds.
If you reload after clicking the link, it will beep 5 seconds before next battle.
But if you have a RE ongoing on HV you can just click the link, the battles piles up (i tested until two though)
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Sep 27 2017, 19:07
Post #5219
Juggernaut Santa



Living in HV 0.83 until Tenboro adds the Tower to Persistent
***********
Group: Gold Star Club
Posts: 11,129
Joined: 26-April 12
Level 500 (Ponyslayer)


QUOTE(ALL_MIGHT @ Sep 27 2017, 18:55) *

I am also using it .(Because it just works smoothly without issues).

So, Could someone please work on these two issues and edit it.
Thanks
(IMG:[invalid] style_emoticons/default/biggrin.gif)

Oh, I'm not the only one then! (IMG:[invalid] style_emoticons/default/biggrin.gif)

I really appreciate every try, even the other one, though it really didn't solve completely the problem.


This re_cnt issue is not a major issue, but still an annoying one.

One consequence is obviously that you don't know when re_cnt=24, thus you wait the last half an hour to see the script reloading an empty page.

The second is more complicated.
Before the script would store the link, and after clicking such link, the RE box would still display, with the expired link, and the script would understand that I'm not leaving a RE undone.
After the break, the box disappears right after toggling the encounter, and every time you have to ask yourself "Did I reload the page this time?", because if the answer is no, I have to prepare for annoying alerts in 29 minutes (IMG:[invalid] style_emoticons/default/heh.gif)

I'm not against the alert, the alert should be here, for, for example, if I'm planning to do 2 RE every hour in a minute.
I leave the RE page toggled, and when the alert sounds, I go and do one encounter, then in a minute I do the following one.

But if I already did the encounter, but the page is displayed as it was reloaded but in fact not reloaded only because the box now disappears as the link is not stored by the script, the alert would still ring and bring forcibly the tab in the foreground until I click the goddamn ok button and reload the page.
And that is quite annoying if you're working at something else on the pc in the meanwhile, since every ten seconds it would pop up again even if you ignore it.

The alert should only sound when I'm going to lose a RE, and that's possible only if the script stores correctly the data.

QUOTE(Draw99Gray @ Sep 27 2017, 19:02) *

If you don't reload the page, 1 minute before the next battle it will start beeping and bringing the tab to the screen every 10 seconds.
If you reload after clicking the link, it will beep 5 seconds before next battle.
But if you have a RE ongoing on HV you can just click the link, the battles piles up (i tested until two though)


You made a tl;dr of what I said, thanks (IMG:[invalid] style_emoticons/default/biggrin.gif)
With the difference that mine does not beep if I reload. Only if I don't.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Sep 27 2017, 21:46
Post #5220
KitsuneAbby



Curse God of the Hentai Shrine
**********
Group: Catgirl Camarilla
Posts: 7,566
Joined: 12-July 14
Level 500 (Ponyslayer)


Sicken, with the last version of monsterbation, I can't get the whole background to aquablue when channeling occurs, even though I did set up the script to do so.
Monsterbation was communicating awfully bad with alt.hentaiverse.org tonight, dunno if it's the script's fault or something else.

This post has been edited by decondelite: Sep 27 2017, 21:50
User is offlineProfile CardPM
Go to the top of the page
+Quote Post


291 Pages V « < 259 260 261 262 263 > » 
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: 11th January 2025 - 22:51