Created
May 13, 2016 15:28
-
-
Save antoinecourtin/444eb4b7b0f6858d4816933ee7a48222 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name ParisMuséeDownload | |
// @namespace pm | |
// @include http://parismuseescollections.paris.fr/* | |
// @version 1 | |
// @grant none | |
// @require http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js | |
// ==/UserScript== | |
$( document ).ready(function() { | |
var isNotice = $("div.node-oeuvre-full").length; | |
if (isNotice) { | |
var img = $("img.magnifier-thumb"); | |
if (img.length) { | |
var insertion = $("div.field").get(1); | |
$(insertion).before("<div class='field'><div class='field-items'><form method='get' action='" + img.attr("data-large-img-url") + "'><button type='submit' style='color: #f6f6f6;background: #56DAD4;border: none;'>Fais toi plaisir et Télécharge !</button></form></div></div>"); | |
} | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment