Page 3 of 5

Re: Turbo-Charge your browser for fanart.tv

Posted: Thu Jul 24, 2014 12:20 am
by Dybal
akovia wrote:While you are at it, maybe you can convert the Chome extension for fanart.tv that Mordred made for FF users. ;)
LOL, maybe. That would definitely require a VM setup. In the meantime:

Code: Select all

img[src*="./images/smilies/"]{width:0px;height:15px;padding-left:15px;background-size:15px 15px;}

img[src="./images/smilies/icon_idea.gif"]{margin-left:-1px;margin-right:1px;background-image:url (
The beginning of icon_idea.gif line needs the margins adjusted a bit to be better centered.

Re: Turbo-Charge your browser for fanart.tv

Posted: Sat Jul 26, 2014 6:30 pm
by Dybal
The more universal smiley code successfully tested in Chromium Version 34.0.1847.116. Complete Stylish code: Chrome Large Smileys, Chrome Small Smileys, Firefox Large Smileys, Firefox Small Smileys. Perhaps you didn't apply the patch correctly? If you can confirm the Chrome version also works for you that would be great.

Slight tweak to additional colors, added dark grey & fixed topic post icons: Chrome & Firefox.
Original, lots of pink
Original, lots of pink
colors.png (6.33 KiB) Viewed 26958 times
additional colors
additional colors
colors.01.png (14.62 KiB) Viewed 26958 times
For your CSS apparently Chrome doesn't like ms. Works with seconds. Also updated my original post.
Dybal wrote:The only tweak I did with yours is to have the info roll back up quicker.
Around line 1071:
  • Code: Select all

        transition: margin-top ease-in 0.5s;
        -webkit-transition: margin-top ease-in 0.5s;
Finally, I ran a diff between the different versions of the imagus mod and came up with a bit ugly hack:

Code: Select all

// ==UserScript==
// @name           Imagus Background Toggle
// @version        0.0.4
// @description    Toggles the Imagus hover background color
// @match          http://*/*
// ==/UserScript==

// 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', '//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js');
  script.addEventListener('load', function() {
    var script = document.createElement('script');
    script.textContent = 'window.jQ=jQuery.noConflict(true);(' + callback.toString() + ')();';
    document.body.appendChild(script);
  }, false);
  document.body.appendChild(script);
}

function main(){

  var nextColor = (function() {
    var colorArray = ['black','white','red','#00ff00','transparent'];
    var count = -1;
    return function() {
      return colorArray[++count % colorArray.length];
    }
  }());

  function toggleImagusBorder() {
   var imagusDiv = jQ('div[style*="z-index: 2147483647"]');
   if (imagusDiv.css('display') !== 'none') {
      imagusDiv.css('background', nextColor());
   }
  }

  function toggleGutter() {
   var imagusDiv = jQ('div[style*="z-index: 2147483647"]');
   if (imagusDiv.css('display') !== 'none') {
    var img = jQ('div[style*="z-index: 2147483647"] img');
    if (img.css('background-image') == 'none') {
      img.css('background-image', 'url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz48c3ZnIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB3aWR0aD0iODAwcHgiIGhlaWdodD0iMzEwcHgiPjxnIG9wYWNpdHk9IjAuNyI+PHBhdGggZmlsbD0iI0ZGMDAwMCIgZD0iTTc5MCwxMHYyOTBIMTBWMTBINzkwIE04MDAsMGgtMTBIMTBIMHYxMHYyOTB2MTBoMTBoNzgwaDEwdi0xMFYxMFYwTDgwMCwweiIvPjwvZz48L3N2Zz4=)');
    } else { img.css('background-image', 'none');}
   }
  }
  
  function doc_keyUpToggleImagusBorder(e) {
    if (e.ctrlKey && e.altKey && e.keyCode == 81) {
      toggleImagusBorder();
    }
   if (e.ctrlKey && e.altKey && e.keyCode == 87) {
     toggleGutter();
   }
  }

  // register the handler 
  document.addEventListener('keyup', doc_keyUpToggleImagusBorder, false);
}

// load jQuery and execute the main function
addJQuery(main);
When you run a diff you can see the toggleGutter() function was removed during the update. Simple enough to stick it back in. Inside toggleGutter() I wrapped the older code with the fix from toggleImagusBorder(). That I'm sure can be done more elegantly, but it works.

Re: Turbo-Charge your browser for fanart.tv

Posted: Sun Jul 27, 2014 7:16 am
by Dybal
Hopefully, last tweak. Topic post icons were finished, but the code wasn't in place to see them. I was going to leave it broken, but after some random flailing around I believe I stumbled into the fix. Updated the Dark Forums Style pastebin links for Chrome & Firefox above. Both Moderation and The Playground have topics with topic post icons.

Re: Turbo-Charge your browser for fanart.tv

Posted: Sun Jul 27, 2014 9:32 pm
by akovia
Dybal wrote: Perhaps you didn't apply the patch correctly?
I'm not sure I know what you mean. All I did was add that line of code to the original small smiley code and it works perfectly as shown in the screenshot.
I am using Version 34.0.1847.116 Ubuntu 12.04 (260972)
Dybal wrote:Slight tweak to additional colors, added dark grey & fixed topic post icons:
Will give it a go.
Dybal wrote:The only tweak I did with yours is to have the info roll back up quicker.
Around line 1071:
  • Code: Select all

        transition: margin-top ease-in 0.5s;
        -webkit-transition: margin-top ease-in 0.5s;
I'm fine with the delay I originally set, but I'm glad you pointed it out for anyone else that would like to tweak it to their liking.
Dybal wrote:Finally, I ran a diff between the different versions of the imagus mod and came up with a bit ugly hack:
Sounds good. Will give it a try when I get some time. :)

Re: Turbo-Charge your browser for fanart.tv

Posted: Sun Jul 27, 2014 10:01 pm
by akovia
Everything is working great. Updated first post with link to Imagus-Mod 0.0.4
Thanks for your work ;)

P.S. I've given you access to be able to upload files to the main site.
http://fanart.tv/wp-admin/upload.php
You should really upload your files to the main site from now on instead of pastebin so they will never expire.

Re: Turbo-Charge your browser for fanart.tv

Posted: Mon Jul 28, 2014 12:57 am
by Dybal
akovia wrote:
Dybal wrote: Perhaps you didn't apply the patch correctly?
I'm not sure I know what you mean. All I did was add that line of code to the original small smiley code and it works perfectly as shown in the screenshot.
I thought a few posts back you had tested the large smiley patch, but it wasn't working correctly for you? No matter. The updated smiley code works for either Firefox or Chrome. It's convenient to have one version. Well, minus the Stylish specific differences.
akovia wrote:I'm fine with the delay I originally set, but I'm glad you pointed it out for anyone else that would like to tweak it to their liking.
Yeah, with the other code it was effectively no delay in Chrome. Not quite what I intended.
akovia wrote:P.S. I've given you access to be able to upload files to the main site.
Cheers, I will upload them in a bit. Just tested the link, but getting an error: You do not have sufficient permissions to access this page.

Re: Turbo-Charge your browser for fanart.tv

Posted: Mon Jul 28, 2014 12:56 pm
by akovia
Sorry about that, I think I have it fixed now. Let me know.

Re: Turbo-Charge your browser for fanart.tv

Posted: Mon Jul 28, 2014 4:11 pm
by Dybal
akovia wrote:Sorry about that, I think I have it fixed now. Let me know.
All working. I updated the links in the above post.

Re: Turbo-Charge your browser for fanart.tv

Posted: Mon Feb 02, 2015 6:22 am
by Dybal
:idea: Dark Compact Style-b last updated on 2015-02-06.

Fixed zorensen's unreported z-index bug: Browse Artists icon above the menu.

Re: Turbo-Charge your browser for fanart.tv

Posted: Mon Feb 02, 2015 2:19 pm
by akovia
Thanks for the updates Dybal! :!: