Skip to content

Instantly share code, notes, and snippets.

@andersonbosa
Created February 9, 2020 11:50
Show Gist options
  • Save andersonbosa/3599142ea6d4d52687daa341da67fb3c to your computer and use it in GitHub Desktop.
Save andersonbosa/3599142ea6d4d52687daa341da67fb3c to your computer and use it in GitHub Desktop.
// ==UserScript==
// @name jQuery Attochator
// @namespace Violentmonkey Scripts
// @match *://*/*
// @grant none
// @version 1.0
// @author anderson "z4b0t" bosa
// @description 2/9/2020, 8:35:28 AM
// ==/UserScript==
var existJquery = false;
if (window.top.$) {
existJquery = window.top.$;
} else if (window.top.jQuery) {
existJquery = window.top.jQuery;
}
if (!existJquery) {
var scriptJquery = document.createElement('script');
scriptJquery.src = 'https://code.jquery.com/jquery-3.4.1.slim.min.js';
scriptJquery.integrity = 'sha256-pasqAKBDmFT4eHoN2ndd6lN370kFiGUFyTiUHWhU7k8=';
scriptJquery.crossorigin = 'anonymous';
var getBodyElem = window.document.querySelector('body');
getBodyElem.append(scriptJquery);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment