Random Homebrew: PSPGolf
PSPGolf based on a golf game by Laurin (LUA Game)
Friends: Coding 'n Cracking - Nymphaea - PS3 Forum - darkforestgroup - daxhordes.org - Tgames - coldbird - gopsp.it - pspstation.org - prometheus - hgoel.info - MakeSmartTV - ps vita

distract-o-matic [1.9]

Things that don't go in any other category

Re: distract-o-matic [1.2]

Postby XxGodOfWar2xX » Sat Apr 07, 2012 7:24 pm

finally, my avatar isnt restricted to 100x100.
new i can actually see my avi :D
User avatar
XxGodOfWar2xX
 
Posts: 2065
Joined: Sat Feb 12, 2011 3:28 pm
Location: Death City

Re: distract-o-matic [1.3]

Postby Xian Nox » Sun Apr 08, 2012 9:37 pm

Due to the immense popularity of this script, with three people confirmed using it, all of which happen to be friends of mine, and in order to bump this thread and prevent it from falling to the bottom of the page and getting lost in the sea of off-topicness, I have decided to update it today, and also spent most of the day doing so. The rest of the day was spent either playing Flyff or being depressed, for the ones that are curious.
What's new in the new version (1.3)? After installing it, you'll notice there's a tiny line appended to all /talk pages, saying distract-o-matic settings. Clicking on the settings part of it brings up a half-working window, where the checkboxes do absolutely nothing, and the field and left button can be used to set a new avatar size value, and the right button can be used to delete the cookie used to set the value.
If you have problems with it, try removing the previous version and installing the new one. This should not only solve the issues, but will help me get the number of downloads higher. If it still doesn't work, let me know.
Spoiler
Disturbed0ne wrote:PS. EVERYONE should like girls. they're just so soft. :oops:
Moderator 80% corrupt. That's funny, I don't feel corrupt. In fact, I feel pretty good.
What looks like a blog of mine can be seen here.
User avatar
Xian Nox
Moderator
 
Posts: 6051
Joined: Fri Nov 05, 2010 5:27 pm
Location: /home/xian/n-field

Re: distract-o-matic [1.3]

Postby jc_gargma » Sun Apr 08, 2012 9:54 pm

The setting menu in 1.3 is splendid.
A few things to mention:
The font to open the settings menu is abit small. Non-intrusive, yes, but could get missed, especially on higher resolution displays. Also, as it appears in the bottom left-most spot, the firefox page loading info can hide it. Perhaps a more central position, in line with the "Powered by pbpBB" notice.
The settings window that pops up could open slightly larger, as the firefox page loading notice covers over the buttons.
The avatar resizing works very well. Perhaps add a "Please refresh page after changing setting to take effect" notice, and a "Valid size (whatever minimum is)-512" next to the avatar sizes field in the window.
Image
User avatar
jc_gargma
Moderator
 
Posts: 6343
Joined: Tue Nov 23, 2010 7:05 am
Location: The Netherworld

Re: distract-o-matic [1.3]

Postby codestation » Mon Apr 09, 2012 2:10 am

10/10, excellent script, would use it again.

And i agree with the location of the settings, a nice place could by below the "Powered by phpBB® Forum Software © phpBB Group" (or Control Panel, for mods :P )
Plugin list
Working on: Python (django, sqlalchemy, PyQt, etc) + Lua
Repositories: github, bitbucket, google code
Just feel the code..
opencma/vitamtp for Archlinux
User avatar
codestation
Big Beholder
 
Posts: 1277
Joined: Wed Jan 19, 2011 3:45 pm
Location: /dev/negi

Re: distract-o-matic [1.3]

Postby jc_gargma » Mon Apr 09, 2012 2:15 am

I just noticed, the cookie now used in distract-o-matic 1.3 is set as "expire on end of session," causing the settings to be lost after browser close.
(The cookie in 1.2 was retained after browser close.)
Image
User avatar
jc_gargma
Moderator
 
Posts: 6343
Joined: Tue Nov 23, 2010 7:05 am
Location: The Netherworld

Re: distract-o-matic [1.3]

Postby fate6 » Mon Apr 09, 2012 4:57 am

I really wish I could +rep you right now :)

any who I will be using this from now on :D
User avatar
fate6
Moderator
 
Posts: 4068
Joined: Fri Mar 09, 2012 1:18 am
Location: fate6@Canterlot:~>

Re: distract-o-matic [1.4]

Postby Xian Nox » Mon Apr 09, 2012 7:26 am

jc_gargma wrote:I just noticed, the cookie now used in distract-o-matic 1.3 is set as "expire on end of session," causing the settings to be lost after browser close.
(The cookie in 1.2 was retained after browser close.)
Fixed that, new version 1.4. It was a problem with the external script used, so to update it, please first remove it from the scripts management, then close the tab (which actually removes it), then install it again. Hopefully all good this time.
Edit: I added in a <center> to the settings, tell me if you think it looks better.
Spoiler
Disturbed0ne wrote:PS. EVERYONE should like girls. they're just so soft. :oops:
Moderator 80% corrupt. That's funny, I don't feel corrupt. In fact, I feel pretty good.
What looks like a blog of mine can be seen here.
User avatar
Xian Nox
Moderator
 
Posts: 6051
Joined: Fri Nov 05, 2010 5:27 pm
Location: /home/xian/n-field

Re: distract-o-matic [1.4]

Postby ViKtory » Mon Apr 09, 2012 8:20 am

Very nice, but there is a problem. The settings menu is hidden by the ads, so please change the location of it.
User avatar
ViKtory
 
Posts: 1103
Joined: Wed Aug 17, 2011 8:07 pm
Location: India

Re: distract-o-matic [1.4]

Postby fate6 » Mon Apr 09, 2012 9:07 am

ok so I update but now every time I go to a new page it asks me for the avi size
and after I do the avi's are still default size >____<
User avatar
fate6
Moderator
 
Posts: 4068
Joined: Fri Mar 09, 2012 1:18 am
Location: fate6@Canterlot:~>

Re: distract-o-matic [1.4]

Postby Xian Nox » Mon Apr 09, 2012 9:18 am

fate6 wrote:ok so I update but now every time I go to a new page it asks me for the avi size
and after I do the avi's are still default size >____<

Here's something:
Look for a cookie called xnx_distract_avi_size. If there is one, delete it.
On the script management, open the folder of the script. Save this file there, and the following code in the other file:
Spoiler
Code: Select all
// ==UserScript==
// @id             wololo.net-0ed71db0-83b7-4b0d-9d32-04a97688ede3@scriptish
// @name           distract-o-matic
// @version        1.4
// @namespace      xnx_distract
// @author         Xian Nox
// @description    Rescaling for gravatar avatars on /talk
// @include        http://wololo.net/talk/*
// @require        http://xiannox.users.sourceforge.net/distract-o-matic/cookie.js
// @run-at         document-end
// ==/UserScript==

var re = new RegExp("http://www.gravatar.com/avatar/*");
var avi_size = 200;
var sett_script = "";

function checkCookie() {
    var size = readCookie("xnx_distract_avi_size");
   
    if (size != null && size != "") {
        avi_size = size;

    } else {       
        do { size = prompt("Avatar size:", ""); }
        while (isNaN(size) || size < 0 || size > 512);
       
        if (size != null && size != "") {
            setCookie("xnx_distract_avi_size", size, 365);
        }
        avi_size = size;
    }
}

// entry point
checkCookie();

for (var i = 0; i < document.images.length; i++) {
    if (document.images[i].src.match(re)) {
        document.images[i].src += "&s=" + avi_size;
        document.images[i].width = avi_size;
        document.images[i].height = avi_size;
    }
}

function contentEval(source) {
  // Check for function input.
  if ('function' == typeof source) {
    // Execute this function with no arguments, by adding parentheses.
    // One set around the function, required for valid syntax, and a
    // second empty set calls the surrounded function.
    source = '(' + source + ')();'
  }

  // Create a script node holding this  source code.
  var script = document.createElement('script');
  script.setAttribute("type", "application/javascript");
  script.textContent = source;

  document.body.appendChild(script);
//  document.body.removeChild(script);
}

sett_script += "function settingsWindow() {";
sett_script += "    wnd = window.open('','','width=300,height=110');";
sett_script += "    wnd.document.write(\"<html><head></head><body><pre>distract-o-matic settings<br><form><input checked='checked' name='distract_enabled_1' type='checkbox' /> Enable huge gravatars (n/a)<br><input name='distract_enabled_2' type='checkbox' /> Force avatar resize (n/a)<br>Avatar size: <input name='distract_avi_size' type='text' /><br><input name='save_settings' type='button' value='Save settings' onclick='setCookie(\\\"xnx_distract_avi_size\\\", document.forms[0].distract_avi_size.value, 356)'/> <input name='reset' type='button' value='Delete cookie' onclick='eraseCookie(\\\"xnx_distract_avi_size\\\");'/></form></pre></body></html>\");";
sett_script += "    var script = wnd.document.createElement('script');";
sett_script += "    script.setAttribute('type', 'text/javascript');";
sett_script += "    script.setAttribute('src', 'http://xiannox.users.sourceforge.net/distract-o-matic/cookie.js');";
sett_script += "    wnd.document.getElementsByTagName('head')[0].appendChild(script);";
sett_script += "    wnd.focus();";
sett_script += "}";

contentEval(sett_script);

document.getElementsByTagName("body")[0].innerHTML += "<center>| distract-o-matic <a href='javascript:settingsWindow();'>settings</a></center>";
Spoiler
Disturbed0ne wrote:PS. EVERYONE should like girls. they're just so soft. :oops:
Moderator 80% corrupt. That's funny, I don't feel corrupt. In fact, I feel pretty good.
What looks like a blog of mine can be seen here.
User avatar
Xian Nox
Moderator
 
Posts: 6051
Joined: Fri Nov 05, 2010 5:27 pm
Location: /home/xian/n-field

PreviousNext

Return to Off-Topic

Who is online

Users browsing this forum: hgoel0974 and 2 guests