Jump to content
The Corroboree

Workaround img/gallery script


ZooL

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
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...