Jump to content
The Corroboree
Sign in to follow this  
ZooL

Workaround img/gallery script

Recommended Posts

// ==UserScript==
// @name         GalWorkAround
// @namespace   http://shaman-australis.com/
// @description  Work around so can click img preview and gallery images
// @author       ZooL
// @include       http://*.shaman-australis.com/forum/index.php?/gallery*
// @include       https://*.shaman-australis.com/forum/index.php?/gallery*
// @run-at document-end
// @grant        none
// ==/UserScript==

(function() {
    'use strict';   
    var preimg;
    if(document.title=="A configuration or server error has occurred")
    {
        var elms = document.getElementsByTagName('link');
        for (var i = 0; i < elms.length; i++)
        {
            if(elms.rel=="preload")
            {
                preimg=elms.href;
            }
        }
            var ctner = document.getElementById('ipsLayout_mainArea');
            ctner.innerHTML="<a href='"+preimg+"'><img style='display:block;margin-left:auto;margin-right:auto;' src='"+preimg+"'></img></a>";
    }
})();



Just replaces the error message with a clickable intended image.

Still can't comment and doesn't fix the DOM-url error that will causes first click in gallery to fail but at least you can see the images, so in gallery when screen goes dark on first click just click the X at top right then click again.


Should work for both greasemonkey and tampermonkey.
(haven't tested a super amount but seems to work but let me know if is error in there and will try fix)

  • Like 3

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×