-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Known Issue with Chromium browsers: xpath last() #27
Comments
xpath issue seems to be related this pair of lines if(!isFirefox() && elem!=document && query.charAt(0)!='.')
query = (query.charAt(0)=='/' ? '.' : './') + query; removing the line seems to fix the issue, but I have no idea why it was put in in the first place. Was there an issue with non-firefox browsers at some point with userscripts? All I can find is that these two lines were part of the initial commit by ameboide 11 years ago. Due to the length of time it has been since it was put in, it's more than likely it was to solve an issue that no longer exists. But I am unsure. For the time being, I'll push a change to the fixes-and-additions dev branch that disables those two lines. They'll be simply commented out for the time being. Still there in the event we find out that they are still needed, it'll be on hand for quick reversion. But this will fix various sites on chrome, such as oglaf, furaffinity, pasteldefender, and possibly others that did something like next: ['(//a[contains(text(),"FORWARD")]|//img[contains(@src, "fore")]/..)[last()]'], to handle multiple possible navigations captures in a single string. |
May have found a better solution than removing the lines. As I've yet to find out the reason behind why the two lines exist, which may still be needed by some out of date browser(?), the better option would to change the isFirefox function to check for |
Some of the sites use a multi if/else setup with the xpath capture. This normally works fine, however for who know show long it has not been working on chrome userscript extensions (TamperMonkey or ViolentMonkey). Yet this works fine with the Firefox versions of those extensions leading me to believe that it's an issue that google made to chromium.
What this causes is that, in the case of Next and Back, is that the console errors out and is unable to parse the capture rules for that navigation. Making the script to not cache pages.
I'm making this issue primarily for two reasons.
The text was updated successfully, but these errors were encountered: