Skip to content

Instantly share code, notes, and snippets.



Forked from tjor/bookmarklet
Last active Aug 29, 2015
What would you like to do?
//Executed through a self-invoking anonymous function
//declare the variables that we will need
var imgName = "10584590_588581994607732_199003263_n.jpg";
var uriA = "";
var uri1 = "";
var uri2 = "";
//build the logic
if (document.URL === uri1) {, "_self");
} else if
(document.URL === uri2) {, "_self");
} else {
alert ("Sorry The image isn't here!");
// I didn't know how to add logic to traverse the DOM and make the Image clickable.
// Started to look at that, but got lost in a spiral of Stackoverflow threads.
// document.getElementsByName(imgName===uriA);
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.