Closed w4tchdoge closed 1 year ago
if you publish the contents of your userscript I can check
if you publish the contents of your userscript I can check
I have published the userscript I had attempted to use on my device to a Gist. If you wish to see the original unmodified userscript it is available on Greasy Fork, which is where I had initially found it.
checked and the error is corrected.
userscripts in bromite are isolated from the page context: window.jQuery
(and $()
) are defined in the context of the page, but not of the userscript.
you must find an alternative method that does not use resources allocated by the main page (try with 'document-end') or include jquery in your userscript
I have a userscript that uses jQuery which runs on a page that I know to have jQuery loaded, however the script does not work. When I use
chrome://inspect/#devices
and USB debugging to view the console of the webpage I have loaded on the bromite-buildtools app on my Android device I see the following error:and when I look in the sources tab, I see that the line is highlighted with an error:
However, when I run
typeof jQuery
in the console it returns'function'
as opposed to the'undefined'
that it would return if jQuery was not present, and when I runjQuery.fn.jquery
to get the version number it returns'1.9.0'
which I know to be the version that the webpage loads.I have checked to make sure that the webpage on my Android devices loads jQuery by using the aforementioned
chrome://inspect/#devices
, inspecting the webpage, and checking the network tab (IMG).I have attempted to remedy this by including// @run-at document-idle
in the userscript metadata block but to no avail.I would like to know whether this is a bug, a limitation of this fork of chromium, or me doing something incorrectly that is causing the userscript to not function. Any help or information that you can provide is much appreciated.