Closed cossname closed 3 years ago
added in 42 ;) I've added it in debug menu and with dynamic timers list :) thanks again @cossname
@Roukys yw any idea for this problem?
ah ... nutaku is a strange one for me I'm not using it, I think somewhere in the code this is to prevent :
if (hh_nutaku)
{
function Alive()
{
window.top.postMessage({ImAlive:true},'*');
if (sessionStorage.HHAuto_Temp_autoLoop=="true")
{
setTimeout(Alive,2000);
}
}
Alive();
}
but does not seems to be uptodate ...
where "hh_nutaku" defined? :upd nvm found it
I'll connect to nutaku to try and understand this alive thing
@cossname this is a recent issue right ?
3 times today
cant reload top window from frame
yes because of cross domain security right ?
yes
I've got the same issue for autologin
will try to find solution for it with
window.top.postMessage({someMessage},'*');
found this
// ==UserScript==
// @name Nutaku reload helper
// @namespace http://tampermonkey.net/
// @version 0.1
// @description Satellite script for HHAuto++, Nutaku version
// @author Dorten D
// @match http*://www.nutaku.net/games/harem-heroes/play*
// @grant none
// ==/UserScript==
(function() {
'use strict';
var lastAnswer = (new Date()).getTime();
window.addEventListener('message', function(event)
{
//console.log('NRH: recieved ',event);
if (event.origin=="https://nutaku.haremheroes.com")
{
//console.log('NRH: recieved ',event);
if (event.data.reloadMe)
{
window.location.reload();
}
if (event.data.ImAlive)
{
//console.log('NRH: ITS ALIVE!');
lastAnswer = (new Date()).getTime();
}
if (!event.data.ImAlive && !event.data.reloadMe)
{
console.log('NRH: recieved ',event);
}
}
}
);
setInterval(function(){
if((new Date()).getTime() - lastAnswer > 25000) {
console.log("NRH: it's dead :(");
window.location.reload();
}
},2000);
})();
1st is generated by script and second generated by app, need to find how to do the good one ...
could you try with window.top.parent.postMessage({ImAlive:true},'*'); ?
cant understand what you need to do... both events similar, except origin, "ImAlive:true" stored in "data" section also why first one have "nutaku.net" origin?
in script replace the line :
window.top.postMessage({ImAlive:true},'*');
by :
window.top.parent.postMessage({ImAlive:true},'*');
they may have changed some frames probably
Design:
Options:
Events:
preview: