How do I get the jQuery-UI version?

You can use $.ui.version, it’s actually the property jQuery UI looks for when determining if it should load itself (if it’s already there, abort). For example here’s a fiddle including version 1.8.4. Unfortunately, $.ui.version was added in jQuery-UI version 1.6. For earlier versions, you can check for $.ui though. So, in this case, the following … Read more

Event when window.location.href changes

I use this script in my extension “Grab Any Media” and work fine ( like youtube case ) var oldHref = document.location.href; window.onload = function() { var bodyList = document.querySelector(“body”) var observer = new MutationObserver(function(mutations) { mutations.forEach(function(mutation) { if (oldHref != document.location.href) { oldHref = document.location.href; /* Changed ! your code here */ } }); … Read more

How can I use jQuery in Greasemonkey scripts in Google Chrome?

From “User Script Tip: Using jQuery – Erik Vold’s Blog” // ==UserScript== // @name jQuery For Chrome (A Cross Browser Example) // @namespace jQueryForChromeExample // @include * // @author Erik Vergobbi Vold & Tyler G. Hicks-Wright // @description This userscript is meant to be an example on how to use jQuery in a userscript on … Read more

How do I get the information from a meta tag with JavaScript?

The other answers should probably do the trick, but this one is simpler and does not require jQuery: document.head.querySelector(“[property~=video][content]”).content; The original question used an RDFa tag with a property=”” attribute. For the normal HTML <meta name=”” …> tags you could use something like: document.querySelector(‘meta[name=”description”]’).content

How can I use jQuery in Greasemonkey?

Perhaps you don’t have a recent enough version of Greasemonkey. It was version 0.8 that added @require. // @require https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js If you don’t have 0.8, then use the technique Joan Piedra describes for manually adding a script element to the page. Between version 0.8 and 0.9, @require is only processed when the script is first … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)