XiozZe / XioScript

XioScript
11 stars 16 forks source link

site ui update #106

Closed cobr123 closed 6 years ago

cobr123 commented 7 years ago

change $('#topblock') to $('div.metro_header')

TeaMike commented 7 years ago

you mean this, 6 times to change? var $topblock = $("#topblock"); It doesn't work for me :(

Additionally, how to fix the same error from the 10.1.5 script ?

cobr123 commented 7 years ago

additionally update this part

change if($(".officePlace a").attr("href") + "/dashboard" !== $(".dashboard a").attr("href") && !!$(".officePlace > a").length || !!$(".officePlace tr:eq(1) a").length){ return false; } to //Not user company //unit list if($(".tabu > .sel > a").attr("href").replace('/unit_list','/dashboard') !== $(".dashboard a").attr("href")){ //unit page if($(".officePlace a").attr("href") + "/dashboard" !== $(".dashboard a").attr("href")) { console.log('Not user company'); return false; } }

cobr123 commented 7 years ago

why you using 10.1.5 ?

TeaMike commented 7 years ago

thanks for the information, it seems to work now :)

XS 10.1.5 because

  1. some functions are missing in XS 12: restaurant, medical center pricing, subdivision renaming and in some cases, to trigger a script on a small group of subdivisions instead of all registered subdivisions

  2. XS 12.1 and higher is not able to load all my subdivisions for management, i am getting a endless time-out when i try to load it the first time.

XiozZe commented 7 years ago

Thanks Cobr, fixed it. The "trigger a script on a small group of subdivisions instead of all registered subdivisions" is now added in XS 12.1.

TeaMike commented 7 years ago

how about 10.1.5 my friends, any quick fix like this? Can't live without my daily fix of pricing at my medical centres and restaurants ;)

cobr123 commented 7 years ago

Try https://github.com/cobr123/XioScript/blob/master/XS12.user.js instead 10.1.5 some history https://github.com/cobr123/XioScript/commits/master/XS12.user.js

TeaMike commented 7 years ago

hmm.. this gets messy because i can't put the settings on list level and i do not understand what the script parameters actually do (how to change to the function "increase or lower price by 3%").

In 10.1.5 in both files XCFS and XSEL i replaced "#topblock" with "metro_header_content" but now the script complains about "Cannot read property 'scrollTop' of undefined".

The only reference to this "ScrollTop" is here:

console.log = function(message) { console.olog(message); if (typeof message !== 'object') {

            var bottom = logger[0].scrollTop + logger[0].offsetHeight === logger[0].scrollHeight;   
            $('#xfDebug').append(Math.floor((new Date().getTime() - time)/1000)+"s : "+message + '<br/>');              
            if(bottom){
                logger[0].scrollTop = logger[0].scrollHeight - logger[0].offsetHeight;
            }

        }
    };

Any idea?

XiozZe commented 7 years ago

Just remove the lines with scrollTop in it. It's used to manage scrollbar of the log. You don't need it.

TeaMike commented 7 years ago

after a second try, this works again :)

TeaMike commented 7 years ago

dang.. script appears but using "price" function gets stuck and says: VM1681:511 Uncaught ReferenceError: bottom is not defined

cobr123 commented 7 years ago

separate fork for version 10 updates https://github.com/cobr123/XioScript-10

TeaMike commented 7 years ago

works like a charm, thank you so much!

XiozZe commented 6 years ago

Because XS12 will not be supported anymore, I close this issue.