Skip to content

Instantly share code, notes, and snippets.

@symac

symac/pm.js

Created May 4, 2016
Embed
What would you like to do?
// ==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'><strong><a href='" + img.attr("data-large-img-url") + "'>Télécharger</a></strong></div></div>");
}
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.