Created
July 30, 2012 12:00
-
-
Save pfactum/3206433 to your computer and use it in GitHub Desktop.
MiniGal Nano improvements, v4
This file contains 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
--- mediaboxAdv-1.3.4b.js~ 2012-07-26 21:24:46.000000000 +0300 | |
+++ mediaboxAdv-1.3.4b.js 2012-07-30 14:59:18.089481136 +0300 | |
@@ -29,11 +29,12 @@ | |
); | |
image = new Element("div", {id: "mbImage"}).injectInside(center); | |
+ image.addEvent("click", next); | |
bottom = new Element("div", {id: "mbBottom"}).injectInside(center).adopt( | |
closeLink = new Element("a", {id: "mbCloseLink", href: "#"}).addEvent("click", close), | |
nextLink = new Element("a", {id: "mbNextLink", href: "#"}).addEvent("click", next), | |
prevLink = new Element("a", {id: "mbPrevLink", href: "#"}).addEvent("click", previous), | |
- imgLink = new Element("a", {id: "mbImageLink", href: "#"}).addEvent("click", openImg), | |
+ imgLink = new Element("a", {id: "mbImageLink", href: "#"}), | |
title = new Element("div", {id: "mbTitle"}), | |
number = new Element("div", {id: "mbNumber"}), | |
caption = new Element("div", {id: "mbCaption"}) | |
@@ -292,10 +293,6 @@ | |
if (options.stopKey) { return false; }; | |
} | |
- function openImg() { | |
- window.open(URL); | |
- } | |
- | |
function previous() { | |
return changeImage(prevImage); | |
} | |
@@ -327,6 +324,7 @@ | |
mediaHeight = ""; | |
} | |
URL = images[imageIndex][0]; | |
+ imgLink.setAttribute('href', URL); | |
// URL = encodeURI(URL).replace("(","%28").replace(")","%29"); | |
captionSplit = images[activeImage][1].split('::'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment