From ee53d1a25eb278006c724cea354e6d55783b7c45 Mon Sep 17 00:00:00 2001 From: 8chan Date: Wed, 8 Oct 2014 20:11:10 +0000 Subject: [PATCH] I did not notice this code was GPLv3. We cannot accept GPLv3 code. Please re-license or make a GPLv3 fork. --- js/image-hover.js | 108 ---------------------------------------------- 1 file changed, 108 deletions(-) delete mode 100644 js/image-hover.js diff --git a/js/image-hover.js b/js/image-hover.js deleted file mode 100644 index 18662c0a..00000000 --- a/js/image-hover.js +++ /dev/null @@ -1,108 +0,0 @@ -/* - Copyright (C) 2014 undido - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . - expands images and webm on hover -*/ - -$(document).ready(function(){ - var mouseisOnImage = false; - var mouseexitedImage = false; - var imageHover = (localStorage['imagehover']) ? true:false; - - imageHover = !imageHover; - - var imageEnter = function(){ - - if (!imageHover) - return; - //don't hover-image if image expanded - if ($(this).parent().attr("data-expanded") == "true") - return; - - - mouseexitedImage = false; - mouseisOnImage = false; - //remove hover-image if user clicks on image to expand it - $(this).click(function(){ - mouseexitedImage = false; - mouseisOnImage = false; - $("#hover-image").remove(); - }); - isVideo = (($(this).prop("tagName") == "VIDEO") ? true:($(this).parent().attr("href").indexOf("player.php?v=") > -1) ? true:false); - maxWidth = document.body.offsetWidth-(document.body.offsetWidth * 0.25); - maxHeight = document.documentElement.clientHeight; - stylez = "z-index:1000;z-index: 1000;position: fixed;top: 0;right: 0;"; - if (!isVideo){ - fileInfo = $(this).parent().parent().children(".fileinfo").children(".unimportant").text(); - isSpoiler = (fileInfo.indexOf("Spoiler") > -1) ? true:false; - imageD = ((isSpoiler) ? fileInfo.split(",")[2]:fileInfo.split(",")[1]); - imageWidth = parseInt(imageD.split("x")[0]); - imageHeight = parseInt(imageD.split("x")[1]); - - widStyle = "max-width:" + maxWidth + "px;"; - heiStyle = ((maxHeight < imageHeight) ? "height:"+maxHeight+"px;":""); - $imgH = $("", {"src":$(this).parent().attr("href"), "style":stylez + ((imageWidth > maxWidth) ? widStyle:"")+heiStyle, "id":"hover-image"}); - } else { - fileInfo = $(this).parent().parent().children(".fileinfo").children(".unimportant").text(); - isSpoiler = (fileInfo.indexOf("Spoiler") > -1) ? true:false; - imageD = ((isSpoiler) ? fileInfo.split(",")[2]:fileInfo.split(",")[1]); - videoWidth = parseInt(imageD.split("x")[0]); - videoHeight = parseInt(imageD.split("x")[1]); - - widStyle = "width:" + ((maxWidth > videoWidth) ? videoWidth:maxWidth) + "px;" + "height:" + ((maxHeight < videoHeight) ? "100%": videoHeight+"px;"); - $imgH = $("