JSFiddle - React, Tailwind, and code Playground
by dledle2
JavaScript
javascript:
/* fiddle note: this is a working DEMO of loading two difference external .js files in a bookmarklet */
javascript: try {
"use strict";
var js;
js = document.createElement("script");
js.addEventListener("load", confirmSuccess);
js.src = "//ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.js";
document.head.appendChild(js);
function confirmSuccess2() {
console.log("2nd script loaded!");
}
function confirmSuccess() {
console.log("jQuery loaded!");
var js2;
js2 = document.createElement("script");
js2.addEventListener("load", confirmSuccess2);
js2.src = "http://toys.euri.ca/nyt.js";
document.head.appendChild(js2);
$.get(window.location.href.replace(/gwh=.*/, ""), "", function (data) {
window.realpage = data;
$("#article").html($(data).find("#article"));
});
$('.masthead.theme-in-story').css('height', '0px');
$('.masthead.theme-in-story').css('display', 'none');
$('#gatewayCreative').css('height', '0px');
$('body').css('overflow', 'auto');
$('#gatewayUnit').remove();
$('html').css('overflow', 'auto');
/* alert('hi1'); */
}
/* alert('hi2'); */
} catch (e1) {
alert(e1)
}
/* thanks to: http://toys.euri.ca/nyt.js */
/* thanks to: http://blog.coolaj86.com/articles/how-to-load-jquery-anywhere.html */