From 3e87925a35f73aa2261eb66df3ef4ca11b64eeea Mon Sep 17 00:00:00 2001 From: erdgeist Date: Tue, 30 Jun 2026 17:11:32 +0200 Subject: Replace Shadowbox with GLightbox, drop jQuery from public site Vendors GLightbox 3.3.1 (MIT, dependency-free) as static files in public/javascripts and public/stylesheets, replacing the Shadowbox 2009 vendor tree and its jQuery adapter. Public site no longer loads jQuery at all. - app/views/layouts/application.html.erb: swap Shadowbox script/style includes and the public_bundle (jQuery) include for GLightbox's CSS/JS - app/views/content/_headline_image.html.erb: headline image is now itself a GLightbox trigger; additional images are direct a.glightbox links sharing a per-page data-gallery group, replacing the hidden shadowbox_images div and its click-forwarding trigger - public/javascripts/public.js: replace Shadowbox.init/setup and the click-forwarding handler with a single GLightbox() init call; remove the unused image_handler object - Remove public/javascripts/shadowbox/ (including vendored Sizzle, swfobject, and unused video/Flash players) and public/stylesheets/shadowbox.css - Remove app/assets/javascripts/public_bundle.js (jquery require) --- .../javascripts/shadowbox/libraries/swfobject/swfobject.js | 14 -------------- 1 file changed, 14 deletions(-) delete mode 100644 public/javascripts/shadowbox/libraries/swfobject/swfobject.js (limited to 'public/javascripts/shadowbox/libraries/swfobject/swfobject.js') diff --git a/public/javascripts/shadowbox/libraries/swfobject/swfobject.js b/public/javascripts/shadowbox/libraries/swfobject/swfobject.js deleted file mode 100644 index 20f435f..0000000 --- a/public/javascripts/shadowbox/libraries/swfobject/swfobject.js +++ /dev/null @@ -1,14 +0,0 @@ -/* SWFObject v2.1 - Copyright (c) 2007-2008 Geoff Stearns, Michael Williams, and Bobby van der Sluis - This software is released under the MIT License -*/ -var swfobject=function(){var UNDEF="undefined",OBJECT="object",SHOCKWAVE_FLASH="Shockwave Flash",SHOCKWAVE_FLASH_AX="ShockwaveFlash.ShockwaveFlash",FLASH_MIME_TYPE="application/x-shockwave-flash",EXPRESS_INSTALL_ID="SWFObjectExprInst",win=window,doc=document,nav=navigator,domLoadFnArr=[],regObjArr=[],objIdArr=[],listenersArr=[],script,timer=null,storedAltContent=null,storedAltContentId=null,isDomLoaded=false,isExpressInstallActive=false;var ua=function(){var w3cdom=typeof doc.getElementById!=UNDEF&&typeof doc.getElementsByTagName!=UNDEF&&typeof doc.createElement!=UNDEF,playerVersion=[0,0,0],d=null;if(typeof nav.plugins!=UNDEF&&typeof nav.plugins[SHOCKWAVE_FLASH]==OBJECT){d=nav.plugins[SHOCKWAVE_FLASH].description;if(d&&!(typeof nav.mimeTypes!=UNDEF&&nav.mimeTypes[FLASH_MIME_TYPE]&&!nav.mimeTypes[FLASH_MIME_TYPE].enabledPlugin)){d=d.replace(/^.*\s+(\S+\s+\S+$)/,"$1");playerVersion[0]=parseInt(d.replace(/^(.*)\..*$/,"$1"),10);playerVersion[1]=parseInt(d.replace(/^.*\.(.*)\s.*$/,"$1"),10);playerVersion[2]=/r/.test(d)?parseInt(d.replace(/^.*r(.*)$/,"$1"),10):0}}else{if(typeof win.ActiveXObject!=UNDEF){var a=null,fp6Crash=false;try{a=new ActiveXObject(SHOCKWAVE_FLASH_AX+".7")}catch(e){try{a=new ActiveXObject(SHOCKWAVE_FLASH_AX+".6");playerVersion=[6,0,21];a.AllowScriptAccess="always"}catch(e){if(playerVersion[0]==6){fp6Crash=true}}if(!fp6Crash){try{a=new ActiveXObject(SHOCKWAVE_FLASH_AX)}catch(e){}}}if(!fp6Crash&&a){try{d=a.GetVariable("$version");if(d){d=d.split(" ")[1].split(",");playerVersion=[parseInt(d[0],10),parseInt(d[1],10),parseInt(d[2],10)]}}catch(e){}}}}var u=nav.userAgent.toLowerCase(),p=nav.platform.toLowerCase(),webkit=/webkit/.test(u)?parseFloat(u.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")):false,ie=false,windows=p?/win/.test(p):/win/.test(u),mac=p?/mac/.test(p):/mac/.test(u); -/*@cc_on - ie = true; - @if (@_win32) - windows = true; - @elif (@_mac) - mac = true; - @end - @*/ -return{w3cdom:w3cdom,pv:playerVersion,webkit:webkit,ie:ie,win:windows,mac:mac}}();var onDomLoad=function(){if(!ua.w3cdom){return}addDomLoadEvent(main);if(ua.ie&&ua.win){try{doc.write("