Skip to content
Browse files

Fixed some https bugs

  • Loading branch information...
1 parent 17b0074 commit d92d903b7995d5bcf4a078d4ee584b171cf437e4 @KingMob committed Jan 3, 2014
Showing with 55 additions and 21 deletions.
  1. +55 −21 slidify.user.js
View
76 slidify.user.js
@@ -2,15 +2,23 @@
// @name Slidify
// @namespace http://dial-a-davidson.net
// @description Creates a slideshow of every image in the thread
-// @include http://boards.4chan.org/*/res/*
-// @include http://*.tumblr.com/*
-// @match http://*.tumblr.com/*
-// @match http://boards.4chan.org/*/res/*
+// @version 1.0.2
+// @include http://boards.4chan.org/*/res/*
+// @include http://*.tumblr.com/*
+// @include https://boards.4chan.org/*/res/*
+// @include https://*.tumblr.com/*
+// @match http://*.tumblr.com/*
+// @match http://boards.4chan.org/*/res/*
+// @match https://*.tumblr.com/*
+// @match https://boards.4chan.org/*/res/*
// ==/UserScript==
// the guts of this userscript - all functions and jQuery calls must be inside main
function jQmain() {
+ var isInIframe = (window.location != window.parent.location) ? true : false;
+ if(isInIframe) { return; }
+
var IMG_SITE_SELECTORS = {
"tumblr.com": {"anchors": false, "selector": "div.post img, div.photo img"},
"4chan.org": {"anchors": true, "selector": "form[name=delform] a:parent[href$=jpeg], form[name=delform] a[href$=jpg], form[name=delform] a[href$=png], form[name=delform] a[href$=gif]"},
@@ -23,8 +31,10 @@ function jQmain() {
// Image data - sandboxing inhibits local file access
- var playpng = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADYAAAAqCAYAAAD4Uag9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3Nywg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iIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpCQzgxNzk1NzdEOEYxMUUwODExMUI1NjNBRTBEQTJDNiIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PuoETW0AAADfSURBVHja7JnBDcMgDEXtqtswQts1WajtCAwTg+QmPQfwwaqAfks+8Q9+fMeyAqsqrRbMrBdaNAAGMIABDGAAA9jqYPsqE491ppLRqnGpxXNXDCHo8/U+PXvcb5RSYovGY1e8ejp2XFLOpXpm1XiEMxg1irZrBgRTkpy7jvU0APslWJY+WE8zpmMGMBG04kiOicExmQ9sM7TiNl8rUqPN7BoMD4x7TMUKGDWKJjVrxmxFbPeTTcVS+o71NG7FeOUe8fupnGe0ahzqUMYz0j//pQIYwAAGMIABDGA+8RFgAFsPxgZJaDDDAAAAAElFTkSuQmCC";
+ // Close icon from NuoveXT Icons by Saki
+ var closeButtonPng = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAADkElEQVR42u2XS08TURTHWxIgPPuiAWOhtJ0oCU34Ai4woaxEAZW4MX4A49aNazdujR/AuDGI+MCVECXRL2CCiZjSQqkGKLUt71cYf7dpCdQ+6EzTG5M5m5m2N53/79z/PeeM2fSfh1m2AANAtgADQLYAA0C2AANAtgADQLYAA6ASf2Kz2SypVOppS0vLE65zxdZaLBb/1tbWI673/xDSAZxOpyWRSIy7XK7A6urqQmNj41A8Hv+Rb63D4ejZ2dmZ6ujo8C0vL88CfisWi+mC0AWAeEcymXzV3d3dT/bNBwcHpmAwGG1ubg6sr6+fgciIn/b5fK7a2lp1e3vbvLi4+IWduAlErOoAbW1tVuwyKcQj2GQmxPdAqAsEOzHCTsxlxPsR/wbxSl1dnUklxHqspALxFYgbMCSqBsADrWRw3OPxBIR4Qs0CCHFAmEOhUJBdGRLfbW5uTnm9Xl99ff3Jmux6IEys/dTa2nqLI1E2hCaAmpqa511dXXfxcME1h4eHwk6/hE4yfxHbFFyLDU1LS0vjx8fHd6oCQGZ7EPgWYZfJ6pmMnr7f399P35+2Te4acW5wXIg1o1jyW1UARJB9ZXd3dwYINw/PK67UfUb8b87LIOfluxYduqqQ3W5XOJwfgLgkslxOCPF4P4z461rF6wYQwU70sBMl7ZRjG1WIb2hoGEV82bapKIAI+oFCpTmXnbK24RwNrq2tac58pQF6KYcfAbhQrNqIyABEKJsDAASlA3AO+rDQJOK9xapNbnUC4mdTU9NwobGjKgB02F4O8XualCdfkyp2L5odEPM0wmuMHZp3QjMAme8l8+eyTaHI2omdGGAnNEFobWR9R0dHJW0jqo34WKLZCYh51gzTyMq2k9ZR4qXb7R6jhJaqNlE+mhRFSU+g+QBEMAOpkUjkBaPEvaoAWK1WG1VnAu9fZfv/+T3TpBbwd3qYY216mMvX7MQwFw6HZ9jVMd4rklUBEME4bdvY2HjHOH1FQOSO0zSpETKbHqfZKf/e3t6ZcVo8OzNOz5KQUcbpssXrAshAOIF4LSDI9oltGA8CueWRQ59+ocnaCfHiheYz4m8jPq5Vg+4+AISdcXiis7Ozf2VlRWR+iMznPYwCgso11d7e7otGo9OIH6OEpvQ8vyKdGCF2duIZVnrMSFH0pR6v+3kZesj1AVVHl/iKAcgMA0B2GACywwCQHQaA7DAAZIcBIDv+Aj5kTU+gFpU3AAAAAElFTkSuQmCC";
// Set jQuery easing library
jQuery.easing.jswing=jQuery.easing.swing;jQuery.extend(jQuery.easing,{def:"easeOutQuad",swing:function(e,f,a,h,g){return jQuery.easing[jQuery.easing.def](e,f,a,h,g)},easeInQuad:function(e,f,a,h,g){return h*(f/=g)*f+a},easeOutQuad:function(e,f,a,h,g){return -h*(f/=g)*(f-2)+a},easeInOutQuad:function(e,f,a,h,g){if((f/=g/2)<1){return h/2*f*f+a}return -h/2*((--f)*(f-2)-1)+a},easeInCubic:function(e,f,a,h,g){return h*(f/=g)*f*f+a},easeOutCubic:function(e,f,a,h,g){return h*((f=f/g-1)*f*f+1)+a},easeInOutCubic:function(e,f,a,h,g){if((f/=g/2)<1){return h/2*f*f*f+a}return h/2*((f-=2)*f*f+2)+a},easeInQuart:function(e,f,a,h,g){return h*(f/=g)*f*f*f+a},easeOutQuart:function(e,f,a,h,g){return -h*((f=f/g-1)*f*f*f-1)+a},easeInOutQuart:function(e,f,a,h,g){if((f/=g/2)<1){return h/2*f*f*f*f+a}return -h/2*((f-=2)*f*f*f-2)+a},easeInQuint:function(e,f,a,h,g){return h*(f/=g)*f*f*f*f+a},easeOutQuint:function(e,f,a,h,g){return h*((f=f/g-1)*f*f*f*f+1)+a},easeInOutQuint:function(e,f,a,h,g){if((f/=g/2)<1){return h/2*f*f*f*f*f+a}return h/2*((f-=2)*f*f*f*f+2)+a},easeInSine:function(e,f,a,h,g){return -h*Math.cos(f/g*(Math.PI/2))+h+a},easeOutSine:function(e,f,a,h,g){return h*Math.sin(f/g*(Math.PI/2))+a},easeInOutSine:function(e,f,a,h,g){return -h/2*(Math.cos(Math.PI*f/g)-1)+a},easeInExpo:function(e,f,a,h,g){return(f==0)?a:h*Math.pow(2,10*(f/g-1))+a},easeOutExpo:function(e,f,a,h,g){return(f==g)?a+h:h*(-Math.pow(2,-10*f/g)+1)+a},easeInOutExpo:function(e,f,a,h,g){if(f==0){return a}if(f==g){return a+h}if((f/=g/2)<1){return h/2*Math.pow(2,10*(f-1))+a}return h/2*(-Math.pow(2,-10*--f)+2)+a},easeInCirc:function(e,f,a,h,g){return -h*(Math.sqrt(1-(f/=g)*f)-1)+a},easeOutCirc:function(e,f,a,h,g){return h*Math.sqrt(1-(f=f/g-1)*f)+a},easeInOutCirc:function(e,f,a,h,g){if((f/=g/2)<1){return -h/2*(Math.sqrt(1-f*f)-1)+a}return h/2*(Math.sqrt(1-(f-=2)*f)+1)+a},easeInElastic:function(f,h,e,l,k){var i=1.70158;var j=0;var g=l;if(h==0){return e}if((h/=k)==1){return e+l}if(!j){j=k*0.3}if(g<Math.abs(l)){g=l;var i=j/4}else{var i=j/(2*Math.PI)*Math.asin(l/g)}return -(g*Math.pow(2,10*(h-=1))*Math.sin((h*k-i)*(2*Math.PI)/j))+e},easeOutElastic:function(f,h,e,l,k){var i=1.70158;var j=0;var g=l;if(h==0){return e}if((h/=k)==1){return e+l}if(!j){j=k*0.3}if(g<Math.abs(l)){g=l;var i=j/4}else{var i=j/(2*Math.PI)*Math.asin(l/g)}return g*Math.pow(2,-10*h)*Math.sin((h*k-i)*(2*Math.PI)/j)+l+e},easeInOutElastic:function(f,h,e,l,k){var i=1.70158;var j=0;var g=l;if(h==0){return e}if((h/=k/2)==2){return e+l}if(!j){j=k*(0.3*1.5)}if(g<Math.abs(l)){g=l;var i=j/4}else{var i=j/(2*Math.PI)*Math.asin(l/g)}if(h<1){return -0.5*(g*Math.pow(2,10*(h-=1))*Math.sin((h*k-i)*(2*Math.PI)/j))+e}return g*Math.pow(2,-10*(h-=1))*Math.sin((h*k-i)*(2*Math.PI)/j)*0.5+l+e},easeInBack:function(e,f,a,i,h,g){if(g==undefined){g=1.70158}return i*(f/=h)*f*((g+1)*f-g)+a},easeOutBack:function(e,f,a,i,h,g){if(g==undefined){g=1.70158}return i*((f=f/h-1)*f*((g+1)*f+g)+1)+a},easeInOutBack:function(e,f,a,i,h,g){if(g==undefined){g=1.70158}if((f/=h/2)<1){return i/2*(f*f*(((g*=(1.525))+1)*f-g))+a}return i/2*((f-=2)*f*(((g*=(1.525))+1)*f+g)+2)+a},easeInBounce:function(e,f,a,h,g){return h-jQuery.easing.easeOutBounce(e,g-f,0,h,g)+a},easeOutBounce:function(e,f,a,h,g){if((f/=g)<(1/2.75)){return h*(7.5625*f*f)+a}else{if(f<(2/2.75)){return h*(7.5625*(f-=(1.5/2.75))*f+0.75)+a}else{if(f<(2.5/2.75)){return h*(7.5625*(f-=(2.25/2.75))*f+0.9375)+a}else{return h*(7.5625*(f-=(2.625/2.75))*f+0.984375)+a}}}},easeInOutBounce:function(e,f,a,h,g){if(f<g/2){return jQuery.easing.easeInBounce(e,f*2,0,h,g)*0.5+a}return jQuery.easing.easeOutBounce(e,f*2-g,0,h,g)*0.5+h*0.5+a}});
@@ -43,15 +53,16 @@ function jQmain() {
}
// Create control HTML and insert immediately
- var slideshow_control_html = $('\
- <div id="slideshow_control" class="reply">\
+ var slidify_control_html = $('\
+ <div id="slidify_control" class="reply">\
<h2>Slidify</h2>\
+ <img id="slidify_control_close_button" src="' + closeButtonPng + '">\
<input type="checkbox" name="random" id="chan_slideshow_random"/>\
<label for="chan_slideshow_random">Random</label><br />\
<input type="checkbox" name="fit_whole_image" id="chan_slideshow_fit_whole" checked/>\
<label for="chan_slideshow_fit_whole">Shrink image to fit</label><br />\
<input type="text" name="slide_dur" value="5" size="3" id="chan_slideshow_dur" /> Num seconds per slide<br />\
- <input type="button" id="chan_start_slideshow" value="Start the show!" />\
+ <input type="button" id="slidify_start_slideshow" value="Start the show!" />\
<hr />\
<b>Play/pause</b>: Space bar<br />\
<b>Prev image</b>: Z, up/left arrow<br />\
@@ -60,16 +71,16 @@ function jQmain() {
<hr />\
<b>Full screen</b>: ' + fullscreen_key_string + '\
</div>');
- // $(document.body).append(slideshow_control_html);
- $(document.body).append(slideshow_control_html);
+ // $(document.body).append(slidify_control_html);
+ $(document.body).append(slidify_control_html);
// Create slideshow HTML and insert immediately
var slideshow_html = $('\
<!--Control Bar-->\
<div id="controls-wrapper" class="load-item">\
<div id="controls">\
\
- <a id="play-button"><img id="pauseplay" src="' + pausepng + '"/></a>\
+ <a id="play-button"><img id="pauseplay" src="' + pausePng + '"/></a>\
\
<!--Slide counter-->\
<div id="slidecounter">\
@@ -93,8 +104,8 @@ function jQmain() {
*/
var load_supersized = function($){$(document).ready(function(){$('body').append('<div id="supersized-loader"></div><ul id="supersized"></ul>')});$.supersized=function(options){var el='#supersized',base=this;base.$el=$(el);base.el=el;vars=$.supersized.vars;base.$el.data("supersized",base);api=base.$el.data('supersized');base.init=function(){$.supersized.vars=$.extend($.supersized.vars,$.supersized.themeVars);$.supersized.vars.options=$.extend({},$.supersized.defaultOptions,$.supersized.themeOptions,options);base.options=$.supersized.vars.options;base._build()};base._build=function(){var thisSlide=0,slideSet='',markers='',markerContent,thumbMarkers='',thumbImage;while(thisSlide<=base.options.slides.length-1){switch(base.options.slide_links){case'num':markerContent=thisSlide;break;case'name':markerContent=base.options.slides[thisSlide].title;break;case'blank':markerContent='';break}slideSet=slideSet+'<li class="slide-'+thisSlide+'"></li>';if(thisSlide==base.options.start_slide-1){if(base.options.slide_links)markers=markers+'<li class="slide-link-'+thisSlide+' current-slide"><a>'+markerContent+'</a></li>';if(base.options.thumb_links){base.options.slides[thisSlide].thumb?thumbImage=base.options.slides[thisSlide].thumb:thumbImage=base.options.slides[thisSlide].image;thumbMarkers=thumbMarkers+'<li class="thumb'+thisSlide+' current-thumb"><img src="'+thumbImage+'"/></li>'}}else{if(base.options.slide_links)markers=markers+'<li class="slide-link-'+thisSlide+'" ><a>'+markerContent+'</a></li>';if(base.options.thumb_links){base.options.slides[thisSlide].thumb?thumbImage=base.options.slides[thisSlide].thumb:thumbImage=base.options.slides[thisSlide].image;thumbMarkers=thumbMarkers+'<li class="thumb'+thisSlide+'"><img src="'+thumbImage+'"/></li>'}}thisSlide++}if(base.options.slide_links)$(vars.slide_list).html(markers);if(base.options.thumb_links&&vars.thumb_tray.length){$(vars.thumb_tray).append('<ul id="'+vars.thumb_list.replace('#','')+'">'+thumbMarkers+'</ul>')}$(base.el).append(slideSet);if(base.options.thumbnail_navigation){vars.current_slide-1<0?prevThumb=base.options.slides.length-1:prevThumb=vars.current_slide-1;$(vars.prev_thumb).show().html($("<img/>").attr("src",base.options.slides[prevThumb].image));vars.current_slide==base.options.slides.length-1?nextThumb=0:nextThumb=vars.current_slide+1;$(vars.next_thumb).show().html($("<img/>").attr("src",base.options.slides[nextThumb].image))}base._start()};base._start=function(){if(base.options.start_slide){vars.current_slide=base.options.start_slide-1}else{vars.current_slide=Math.floor(Math.random()*base.options.slides.length)}var linkTarget=base.options.new_window?' target="_blank"':'';if(base.options.performance==3){base.$el.addClass('speed')}else if((base.options.performance==1)||(base.options.performance==2)){base.$el.addClass('quality')}if(base.options.random){arr=base.options.slides;for(var j,x,i=arr.length;i;j=parseInt(Math.random()*i),x=arr[--i],arr[i]=arr[j],arr[j]=x);base.options.slides=arr}if(base.options.slides.length>1){if(base.options.slides.length>2){vars.current_slide-1<0?loadPrev=base.options.slides.length-1:loadPrev=vars.current_slide-1;var imageLink=(base.options.slides[loadPrev].url)?"href='"+base.options.slides[loadPrev].url+"'":"";var imgPrev=$('<img src="'+base.options.slides[loadPrev].image+'"/>');var slidePrev=base.el+' li:eq('+loadPrev+')';imgPrev.appendTo(slidePrev).wrap('<a '+imageLink+linkTarget+'></a>').parent().parent().addClass('image-loading prevslide');imgPrev.load(function(){$(this).data('origWidth',$(this).width()).data('origHeight',$(this).height());base.resizeNow()})}}else{base.options.slideshow=0}imageLink=(api.getField('url'))?"href='"+api.getField('url')+"'":"";var img=$('<img src="'+api.getField('image')+'"/>');var slideCurrent=base.el+' li:eq('+vars.current_slide+')';img.appendTo(slideCurrent).wrap('<a '+imageLink+linkTarget+'></a>').parent().parent().addClass('image-loading activeslide');img.load(function(){base._origDim($(this));base.resizeNow();base.launch();if(typeof theme!='undefined'&&typeof theme._init=="function")theme._init()});if(base.options.slides.length>1){vars.current_slide==base.options.slides.length-1?loadNext=0:loadNext=vars.current_slide+1;imageLink=(base.options.slides[loadNext].url)?"href='"+base.options.slides[loadNext].url+"'":"";var imgNext=$('<img src="'+base.options.slides[loadNext].image+'"/>');var slideNext=base.el+' li:eq('+loadNext+')';imgNext.appendTo(slideNext).wrap('<a '+imageLink+linkTarget+'></a>').parent().parent().addClass('image-loading');imgNext.load(function(){$(this).data('origWidth',$(this).width()).data('origHeight',$(this).height());base.resizeNow()})}base.$el.css('visibility','hidden');$('.load-item').hide()};base.launch=function(){base.$el.css('visibility','visible');$('#supersized-loader').remove();if(typeof theme!='undefined'&&typeof theme.beforeAnimation=="function")theme.beforeAnimation('next');$('.load-item').show();if(base.options.keyboard_nav){$(document.documentElement).keyup(function(event){if(vars.in_animation)return false;if((event.keyCode==37)||(event.keyCode==40)||(event.keyCode==90)||(event.keyCode==122)){clearInterval(vars.slideshow_interval);base.prevSlide()}else if((event.keyCode==39)||(event.keyCode==38)||(event.keyCode==88)||(event.keyCode==120)){clearInterval(vars.slideshow_interval);base.nextSlide()}else if(event.keyCode==32&&!vars.hover_pause){clearInterval(vars.slideshow_interval);base.playToggle()}})}if(base.options.slideshow&&base.options.pause_hover){$(base.el).hover(function(){if(vars.in_animation)return false;vars.hover_pause=true;if(!vars.is_paused){vars.hover_pause='resume';base.playToggle()}},function(){if(vars.hover_pause=='resume'){base.playToggle();vars.hover_pause=false}})}if(base.options.slide_links){$(vars.slide_list+'> li').click(function(){index=$(vars.slide_list+'> li').index(this);targetSlide=index+1;base.goTo(targetSlide);return false})}if(base.options.thumb_links){$(vars.thumb_list+'> li').click(function(){index=$(vars.thumb_list+'> li').index(this);targetSlide=index+1;api.goTo(targetSlide);return false})}if(base.options.slideshow&&base.options.slides.length>1){if(base.options.autoplay&&base.options.slides.length>1){vars.slideshow_interval=setInterval(base.nextSlide,base.options.slide_interval)}else{vars.is_paused=true}$('.load-item img').bind("contextmenu mousedown",function(){return false})}$(window).resize(function(){base.resizeNow()})};base.resizeNow=function(){return base.$el.each(function(){$('img',base.el).each(function(){thisSlide=$(this);var ratio=(thisSlide.data('origHeight')/thisSlide.data('origWidth')).toFixed(2);var browserwidth=base.$el.width(),browserheight=base.$el.height(),offset;if(base.options.fit_always){if((browserheight/browserwidth)>ratio){resizeWidth()}else{resizeHeight()}}else{if((browserheight<=base.options.min_height)&&(browserwidth<=base.options.min_width)){if((browserheight/browserwidth)>ratio){base.options.fit_landscape&&ratio<1?resizeWidth(true):resizeHeight(true)}else{base.options.fit_portrait&&ratio>=1?resizeHeight(true):resizeWidth(true)}}else if(browserwidth<=base.options.min_width){if((browserheight/browserwidth)>ratio){base.options.fit_landscape&&ratio<1?resizeWidth(true):resizeHeight()}else{base.options.fit_portrait&&ratio>=1?resizeHeight():resizeWidth(true)}}else if(browserheight<=base.options.min_height){if((browserheight/browserwidth)>ratio){base.options.fit_landscape&&ratio<1?resizeWidth():resizeHeight(true)}else{base.options.fit_portrait&&ratio>=1?resizeHeight(true):resizeWidth()}}else{if((browserheight/browserwidth)>ratio){base.options.fit_landscape&&ratio<1?resizeWidth():resizeHeight()}else{base.options.fit_portrait&&ratio>=1?resizeHeight():resizeWidth()}}}function resizeWidth(minimum){if(minimum){if(thisSlide.width()<browserwidth||thisSlide.width()<base.options.min_width){if(thisSlide.width()*ratio>=base.options.min_height){thisSlide.width(base.options.min_width);thisSlide.height(thisSlide.width()*ratio)}else{resizeHeight()}}}else{if(base.options.min_height>=browserheight&&!base.options.fit_landscape){if(browserwidth*ratio>=base.options.min_height||(browserwidth*ratio>=base.options.min_height&&ratio<=1)){thisSlide.width(browserwidth);thisSlide.height(browserwidth*ratio)}else if(ratio>1){thisSlide.height(base.options.min_height);thisSlide.width(thisSlide.height()/ratio)}else if(thisSlide.width()<browserwidth){thisSlide.width(browserwidth);thisSlide.height(thisSlide.width()*ratio)}}else{thisSlide.width(browserwidth);thisSlide.height(browserwidth*ratio)}}};function resizeHeight(minimum){if(minimum){if(thisSlide.height()<browserheight){if(thisSlide.height()/ratio>=base.options.min_width){thisSlide.height(base.options.min_height);thisSlide.width(thisSlide.height()/ratio)}else{resizeWidth(true)}}}else{if(base.options.min_width>=browserwidth){if(browserheight/ratio>=base.options.min_width||ratio>1){ thisSlide.height(browserheight);thisSlide.width(browserheight/ratio)}else if(ratio<=1){thisSlide.width(base.options.min_width);thisSlide.height(thisSlide.width()*ratio)}}else{thisSlide.height(browserheight);thisSlide.width(browserheight/ratio)}}};if(thisSlide.parents('li').hasClass('image-loading')){$('.image-loading').removeClass('image-loading')}if(base.options.horizontal_center){$(this).css('left',(browserwidth-$(this).width())/2)}if(base.options.vertical_center){$(this).css('top',(browserheight-$(this).height())/2)}});if(base.options.image_protect){$('img',base.el).bind("contextmenu mousedown",function(){return false})}return false})};base.nextSlide=function(){if(vars.in_animation||!api.options.slideshow)return false;else vars.in_animation=true;clearInterval(vars.slideshow_interval);var slides=base.options.slides,liveslide=base.$el.find('.activeslide');$('.prevslide').removeClass('prevslide');liveslide.removeClass('activeslide').addClass('prevslide');vars.current_slide+1==base.options.slides.length?vars.current_slide=0:vars.current_slide++;var nextslide=$(base.el+' li:eq('+vars.current_slide+')'),prevslide=base.$el.find('.prevslide');if(base.options.performance==1)base.$el.removeClass('quality').addClass('speed');loadSlide=false;vars.current_slide==base.options.slides.length-1?loadSlide=0:loadSlide=vars.current_slide+1;var targetList=base.el+' li:eq('+loadSlide+')';if(!$(targetList).html()){var linkTarget=base.options.new_window?' target="_blank"':'';imageLink=(base.options.slides[loadSlide].url)?"href='"+base.options.slides[loadSlide].url+"'":"";var img=$('<img src="'+base.options.slides[loadSlide].image+'"/>');img.appendTo(targetList).wrap('<a '+imageLink+linkTarget+'></a>').parent().parent().addClass('image-loading').css('visibility','hidden');img.load(function(){base._origDim($(this));base.resizeNow()})};if(base.options.thumbnail_navigation==1){vars.current_slide-1<0?prevThumb=base.options.slides.length-1:prevThumb=vars.current_slide-1;$(vars.prev_thumb).html($("<img/>").attr("src",base.options.slides[prevThumb].image));nextThumb=loadSlide;$(vars.next_thumb).html($("<img/>").attr("src",base.options.slides[nextThumb].image))}if(typeof theme!='undefined'&&typeof theme.beforeAnimation=="function")theme.beforeAnimation('next');if(base.options.slide_links){$('.current-slide').removeClass('current-slide');$(vars.slide_list+'> li').eq(vars.current_slide).addClass('current-slide')}nextslide.css('visibility','hidden').addClass('activeslide');switch(base.options.transition){case 0:case'none':nextslide.css('visibility','visible');vars.in_animation=false;break;case 1:case'fade':nextslide.animate({opacity:0},0).css('visibility','visible').animate({opacity:1,avoidTransforms:false},base.options.transition_speed,function(){base.afterAnimation()});break;case 2:case'slideTop':nextslide.animate({top:-base.$el.height()},0).css('visibility','visible').animate({top:0,avoidTransforms:false},base.options.transition_speed,function(){base.afterAnimation()});break;case 3:case'slideRight':nextslide.animate({left:base.$el.width()},0).css('visibility','visible').animate({left:0,avoidTransforms:false},base.options.transition_speed,function(){base.afterAnimation()});break;case 4:case'slideBottom':nextslide.animate({top:base.$el.height()},0).css('visibility','visible').animate({top:0,avoidTransforms:false},base.options.transition_speed,function(){base.afterAnimation()});break;case 5:case'slideLeft':nextslide.animate({left:-base.$el.width()},0).css('visibility','visible').animate({left:0,avoidTransforms:false},base.options.transition_speed,function(){base.afterAnimation()});break;case 6:case'carouselRight':nextslide.animate({left:base.$el.width()},0).css('visibility','visible').animate({left:0,avoidTransforms:false},base.options.transition_speed,function(){base.afterAnimation()});liveslide.animate({left:-base.$el.width(),avoidTransforms:false},base.options.transition_speed);break;case 7:case'carouselLeft':nextslide.animate({left:-base.$el.width()},0).css('visibility','visible').animate({left:0,avoidTransforms:false},base.options.transition_speed,function(){base.afterAnimation()});liveslide.animate({left:base.$el.width(),avoidTransforms:false},base.options.transition_speed);break}return false};base.prevSlide=function(){if(vars.in_animation||!api.options.slideshow)return false;else vars.in_animation=true;clearInterval(vars.slideshow_interval);var slides=base.options.slides,liveslide=base.$el.find('.activeslide');$('.prevslide').removeClass('prevslide');liveslide.removeClass('activeslide').addClass('prevslide');vars.current_slide==0?vars.current_slide=base.options.slides.length-1:vars.current_slide--;var nextslide=$(base.el+' li:eq('+vars.current_slide+')'),prevslide=base.$el.find('.prevslide');if(base.options.performance==1)base.$el.removeClass('quality').addClass('speed');loadSlide=vars.current_slide;var targetList=base.el+' li:eq('+loadSlide+')';if(!$(targetList).html()){var linkTarget=base.options.new_window?' target="_blank"':'';imageLink=(base.options.slides[loadSlide].url)?"href='"+base.options.slides[loadSlide].url+"'":"";var img=$('<img src="'+base.options.slides[loadSlide].image+'"/>');img.appendTo(targetList).wrap('<a '+imageLink+linkTarget+'></a>').parent().parent().addClass('image-loading').css('visibility','hidden');img.load(function(){base._origDim($(this));base.resizeNow()})};if(base.options.thumbnail_navigation==1){prevThumb=loadSlide;$(vars.prev_thumb).html($("<img/>").attr("src",base.options.slides[prevThumb].image));vars.current_slide==base.options.slides.length-1?nextThumb=0:nextThumb=vars.current_slide+1;$(vars.next_thumb).html($("<img/>").attr("src",base.options.slides[nextThumb].image))}if(typeof theme!='undefined'&&typeof theme.beforeAnimation=="function")theme.beforeAnimation('prev');if(base.options.slide_links){$('.current-slide').removeClass('current-slide');$(vars.slide_list+'> li').eq(vars.current_slide).addClass('current-slide')}nextslide.css('visibility','hidden').addClass('activeslide');switch(base.options.transition){case 0:case'none':nextslide.css('visibility','visible');vars.in_animation=false;base.afterAnimation();break;case 1:case'fade':nextslide.animate({opacity:0},0).css('visibility','visible').animate({opacity:1,avoidTransforms:false},base.options.transition_speed,function(){base.afterAnimation()});break;case 2:case'slideTop':nextslide.animate({top:base.$el.height()},0).css('visibility','visible').animate({top:0,avoidTransforms:false},base.options.transition_speed,function(){base.afterAnimation()});break;case 3:case'slideRight':nextslide.animate({left:-base.$el.width()},0).css('visibility','visible').animate({left:0,avoidTransforms:false},base.options.transition_speed,function(){base.afterAnimation()});break;case 4:case'slideBottom':nextslide.animate({top:-base.$el.height()},0).css('visibility','visible').animate({top:0,avoidTransforms:false},base.options.transition_speed,function(){base.afterAnimation()});break;case 5:case'slideLeft':nextslide.animate({left:base.$el.width()},0).css('visibility','visible').animate({left:0,avoidTransforms:false},base.options.transition_speed,function(){base.afterAnimation()});break;case 6:case'carouselRight':nextslide.animate({left:-base.$el.width()},0).css('visibility','visible').animate({left:0,avoidTransforms:false},base.options.transition_speed,function(){base.afterAnimation()});liveslide.animate({left:0},0).animate({left:base.$el.width(),avoidTransforms:false},base.options.transition_speed);break;case 7:case'carouselLeft':nextslide.animate({left:base.$el.width()},0).css('visibility','visible').animate({left:0,avoidTransforms:false},base.options.transition_speed,function(){base.afterAnimation()});liveslide.animate({left:0},0).animate({left:-base.$el.width(),avoidTransforms:false},base.options.transition_speed);break}return false};base.playToggle=function(){if(vars.in_animation||!api.options.slideshow)return false;if(vars.is_paused){vars.is_paused=false;if(typeof theme!='undefined'&&typeof theme.playToggle=="function")theme.playToggle('play');vars.slideshow_interval=setInterval(base.nextSlide,base.options.slide_interval)}else{vars.is_paused=true;if(typeof theme!='undefined'&&typeof theme.playToggle=="function")theme.playToggle('pause');clearInterval(vars.slideshow_interval)}return false};base.goTo=function(targetSlide){if(vars.in_animation||!api.options.slideshow)return false;var totalSlides=base.options.slides.length;if(targetSlide<0){targetSlide=totalSlides}else if(targetSlide>totalSlides){targetSlide=1}targetSlide=totalSlides-targetSlide+1;clearInterval(vars.slideshow_interval);if(typeof theme!='undefined'&&typeof theme.goTo=="function")theme.goTo();if(vars.current_slide==totalSlides-targetSlide){if(!(vars.is_paused)){vars.slideshow_interval=setInterval(base.nextSlide,base.options.slide_interval)}return false}if(totalSlides-targetSlide>vars.current_slide){vars.current_slide=totalSlides-targetSlide-1;vars.update_images='next';base._placeSlide(vars.update_images)}else if(totalSlides-targetSlide<vars.current_slide){vars.current_slide=totalSlides-targetSlide+1;vars.update_images='prev';base._placeSlide(vars.update_images)}if(base.options.slide_links){$(vars.slide_list+'> .current-slide').removeClass('current-slide');$(vars.slide_list+'> li').eq((totalSlides-targetSlide)).addClass('current-slide')}if(base.options.thumb_links){$(vars.thumb_list+'> .current-thumb').removeClass('current-thumb');$(vars.thumb_list+'> li').eq((totalSlides-targetSlide)).addClass('current-thumb')}};base._placeSlide=function(place){var linkTarget=base.options.new_window?' target="_blank"':'';loadSlide=false;if(place=='next'){vars.current_slide==base.options.slides.length-1?loadSlide=0:loadSlide=vars.current_slide+1;var targetList=base.el+' li:eq('+loadSlide+')';if(!$(targetList).html()){var linkTarget=base.options.new_window?' target="_blank"':'';imageLink=(base.options.slides[loadSlide].url)?"href='"+base.options.slides[loadSlide].url+"'":"";var img=$('<img src="'+base.options.slides[loadSlide].image+'"/>');img.appendTo(targetList).wrap('<a '+imageLink+linkTarget+'></a>').parent().parent().addClass('image-loading').css('visibility','hidden');img.load(function(){base._origDim($(this));base.resizeNow()})};base.nextSlide()}else if(place=='prev'){vars.current_slide-1<0?loadSlide=base.options.slides.length-1:loadSlide=vars.current_slide-1;var targetList=base.el+' li:eq('+loadSlide+')';if(!$(targetList).html()){var linkTarget=base.options.new_window?' target="_blank"':'';imageLink=(base.options.slides[loadSlide].url)?"href='"+base.options.slides[loadSlide].url+"'":"";var img=$('<img src="'+base.options.slides[loadSlide].image+'"/>');img.appendTo(targetList).wrap('<a '+imageLink+linkTarget+'></a>').parent().parent().addClass('image-loading').css('visibility','hidden');img.load(function(){base._origDim($(this));base.resizeNow()})};base.prevSlide()}};base._origDim=function(targetSlide){targetSlide.data('origWidth',targetSlide.width()).data('origHeight',targetSlide.height())};base.afterAnimation=function(){if(base.options.performance==1){base.$el.removeClass('speed').addClass('quality')}if(vars.update_images){vars.current_slide-1<0?setPrev=base.options.slides.length-1:setPrev=vars.current_slide-1;vars.update_images=false;$('.prevslide').removeClass('prevslide');$(base.el+' li:eq('+setPrev+')').addClass('prevslide')}vars.in_animation=false;if(!vars.is_paused&&base.options.slideshow){vars.slideshow_interval=setInterval(base.nextSlide,base.options.slide_interval);if(base.options.stop_loop&&vars.current_slide==base.options.slides.length-1)base.playToggle()}if(typeof theme!='undefined'&&typeof theme.afterAnimation=="function")theme.afterAnimation();return false};base.getField=function(field){return base.options.slides[vars.current_slide][field]};base.init()};$.supersized.vars={thumb_tray:'#thumb-tray',thumb_list:'#thumb-list',slide_list:'#slide-list',current_slide:0,in_animation:false,is_paused:false,hover_pause:false,slideshow_interval:false,update_images:false,options:{}};$.supersized.defaultOptions={slideshow:1,autoplay:1,start_slide:1,stop_loop:0,random:0,slide_interval:5000,transition:1,transition_speed:750,new_window:1,pause_hover:0,keyboard_nav:1,performance:1,image_protect:1,fit_always:0,fit_landscape:0,fit_portrait:1,min_width:0,min_height:0,horizontal_center:1,vertical_center:1,slide_links:1,thumb_links:1,thumbnail_navigation:0};$.fn.supersized=function(options){return this.each(function(){(new $.supersized(options))})}};
- // Forch theme: modified Shutter theme: removed thumb and navigation stuff, used playpng and pausepng data URI vars
- var load_supersized_theme = function($){theme={_init:function(){if(api.options.slide_links)$(vars.slide_list).css('margin-left',-$(vars.slide_list).width()/2);if(api.options.autoplay){}else{if($(vars.play_button).attr('src'))$(vars.play_button).attr("src",vars.image_path+"play.png");if(api.options.progress_bar)$(vars.progress_bar).stop().animate({left:-$(window).width()},0)}if($(vars.slide_total).length){$(vars.slide_total).html(api.options.slides.length)}$(vars.play_button).click(function(){api.playToggle()})},playToggle:function(state){if(state=='play'){if($(vars.play_button).attr('src'))$(vars.play_button).attr("src",pausepng)}else if(state=='pause'){if($(vars.play_button).attr('src'))$(vars.play_button).attr("src",playpng)}},beforeAnimation:function(direction){if(vars.slide_current.length){$(vars.slide_current).html(vars.current_slide+1)}},afterAnimation:function(){}};$.supersized.themeVars={play_button:'#pauseplay',slide_current:'.slidenumber',slide_total:'.totalslides',};$.supersized.themeOptions={}};
+ // Forch theme: modified Shutter theme: removed thumb and navigation stuff, used playPng and pausePng data URI vars
+ var load_supersized_theme = function($){theme={_init:function(){if(api.options.slide_links)$(vars.slide_list).css('margin-left',-$(vars.slide_list).width()/2);if(api.options.autoplay){}else{if($(vars.play_button).attr('src'))$(vars.play_button).attr("src",vars.image_path+"play.png");if(api.options.progress_bar)$(vars.progress_bar).stop().animate({left:-$(window).width()},0)}if($(vars.slide_total).length){$(vars.slide_total).html(api.options.slides.length)}$(vars.play_button).click(function(){api.playToggle()})},playToggle:function(state){if(state=='play'){if($(vars.play_button).attr('src'))$(vars.play_button).attr("src",pausePng)}else if(state=='pause'){if($(vars.play_button).attr('src'))$(vars.play_button).attr("src",playPng)}},beforeAnimation:function(direction){if(vars.slide_current.length){$(vars.slide_current).html(vars.current_slide+1)}},afterAnimation:function(){}};$.supersized.themeVars={play_button:'#pauseplay',slide_current:'.slidenumber',slide_total:'.totalslides',};$.supersized.themeOptions={}};
var imageInfo = function(){
// Parse imgs or anchors to determine img names
@@ -193,7 +204,7 @@ function jQmain() {
// Forcibly stop and reset for next slideshow
clearInterval(vars.slideshow_interval);
- $(vars.play_button).attr("src", pausepng);
+ $(vars.play_button).attr("src", pausePng);
hide_slideshow_html();
$("ul#supersized li").remove();
@@ -202,8 +213,19 @@ function jQmain() {
}
};
+ var toggle_hide_slidify = function(){
+ $("#slidify_control").css("overflow", "hidden");
+ $("#slidify_control").animate({ "left": ($(window).width() - 15) + "px" })
+ }
+
+ var close_slidify = function(){
+ $("#slidify_control").fadeOut("slow");
+ }
+
// Attach start callback
- $("#chan_start_slideshow").click(start_slideshow);
+ $("#slidify_start_slideshow").click(start_slideshow);
+ $("#slidify_control").click(hide_slidify);
+ $("#slidify_control_close_button").click(close_slidify);
}
// Check for existence of GM_addStyle, and set if necess
@@ -219,7 +241,7 @@ if(typeof GM_addStyle == 'undefined') {
// My control panel CSS
GM_addStyle("\
- #slideshow_control {\
+ #slidify_control {\
/* margin-top: 20px; */\
padding: 15px;\
/* position: absolute; */\
@@ -228,12 +250,24 @@ GM_addStyle("\
top: 20px; \
border: 6px solid black;\
border-radius: 50px 25px;\
- opacity: .95\
+ opacity: .95;\
+ background-color: #ededed;\
+ \
+ font-family: Helvetica, Tahoma, Arial, sans-serif;\
}\
-\
- #slideshow_control input, hr {\
+ \
+ #slidify_control div, h2, b { \
+ font-family: inherit;\
+ }\
+ #slidify_control input, hr {\
margin: 4px;\
}\
+ \
+ #slidify_control_close_button { \
+ position: absolute;\
+ top: 0px;\
+ right: 0px;\
+ }\
")
// Image data URI - sandboxing inhibits local file access
@@ -279,7 +313,7 @@ GM_addStyle("\
// a function that loads jQuery and calls a callback function when jQuery has finished loading
function addJQuery(callback) {
var script = document.createElement("script");
- script.setAttribute("src", "http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js");
+ script.setAttribute("src", "//ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js");
script.addEventListener('load',
function() {
var script = document.createElement("script");

0 comments on commit d92d903

Please sign in to comment.
Something went wrong with that request. Please try again.