Run this in your browser's JavaScript console, then jQuery should be available...
var jq = document.createElement('script');
jq.src = "https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js";
document.getElementsByTagName('head')[0].appendChild(jq);
// ... give time for script to load, then type (or see below for non wait option)
jQuery.noConflict();
NOTE: if the site has scripts that conflict with jQuery (other libs, etc.) you could still run into problems.
Update:
Making the best better, creating a Bookmark makes it really convenient, let's do it, and a little feedback is great too:
- Right click the Bookmarks Bar, and click Add Page
- Name it as you like, e.g. Inject jQuery, and use the following line for URL:
javascript:(function(e,s){e.src=s;e.onload=function(){jQuery.noConflict();console.log('jQuery injected')};document.head.appendChild(e);})(document.createElement('script'),'//code.jquery.com/jquery-latest.min.js')
Below is the formatted code:
javascript: (function(e, s) {
e.src = s;
e.onload = function() {
jQuery.noConflict();
console.log('jQuery injected');
};
document.head.appendChild(e);
})(document.createElement('script'), '//code.jquery.com/jquery-latest.min.js')
Here the official jQuery CDN URL is used, feel free to use your own CDN/version.
document.getElementById('tableID').rows.length
. If the table doesn't have an ID, use the DOM editor to give it one. You don't need jQuery for something so absurdly trivial. – Hema$
to query select elements – Burschenschaft