Wednesday, January 23, 2013

HikkiNotify - Desktop Notifications



ThomasPink is working on HikkiNotify. HikkNotify is an app allowing users to receive notifcations via a Desktop alert.
ThomasPink has ready-made versions for Mac OS and Linux. Windows releases are unknown.


 Quoted from ThomasPink:
This is a quick Perl script I put together this morning quickly, which displays notifications on my desktop when new posts are made on HC. Clicking on a notification opens the thread in a new tab in my browser, and if the post quotes me (i.e. if it's replying to one of my own posts), then it will play a longer alert sound, and stay on the desktop until I've clicked it away.

Currently it's only available for Mac OS X, but porting it to the major Linux distributions would be quite trivial with libnotify. I don't want to begin thinking about porting it to Windows.




Thursday, January 10, 2013

HC Plus! 1.2.0

HC Plus 1.2.0 has been released.
Download: http://userscripts.org/scripts/show/152440
Source Code: http://userscripts.org/scripts/review/152440

Usage:
Ctrl + Z Set your username for post highlighter.

bbcode shortcuts:
Alt + X bold
Alt + K italics
Alt + P underline
Alt + C code wrapper
Alt + I image wrapper
Alt + U url wrapper
Alt + Z spoiler wrapper
Alt + Q quote wrapper
Alt + Y youtube wrapper

You can manually enable/disable features from the script code:
//Settings
// Use "true" to enable option or "false" to disable option.
enableEveryoneVip = true;
enableHideRank = true;
enableHideStats = true;
enableHighlighter = true;
enableImageResizer = true;
enableRemoveSignature = true;
enableBBCodeShortcuts = true;
enableAvatarFade = true;
enableTopButton = true;


/* Changelog
1.2.0
    -Fixed top button
    -Code cleanup
1.1.9    -Added new bbcode and changed shortchuts
    -Sped up image resizer
    -Code cleanup
1.1.8
    -Added jQuery libraries @include
    -Added fade-in/fade-out effect for avatars
    -Added "top" button
1.1.7
    -Added bbcode shortcuts
    -Code cleanup
1.0.7
    -Minor code clean up
1.0.6
    -Fixed the image resizer conflict with CSS
    -Fixed settings
    -Removed customSearch function
    -Made features optional
    -Added @include handle for HC forum
    -Edited CSS code for image resizer compatibility
1.0.5
    -Added ThomasPink CSS as JS option for Stats, VIP, Rank, etc
    -Created separate resource file for CSS code. CSS will now load on document-start
1.0.4
    -Added handle for Google Chrome browsers
1.0.3
    -Added poster signature remover
1.0.2
    -Code clean up
1.0.1
    -Added image resizer
1.0.0
    -Initial code
*/

Wednesday, January 9, 2013

Too drunk

I'm far too drunk to post anything.

Right now I am busy watching "A Scanner Darkly" again. Enjoy kids. You know your family-friendly www.kat.ph for awesome torrents. Ragggee.... nahhh... more like... laziness.

Monday, January 7, 2013

Problem with code

So it's 2:30am and I've been working on several parts of HC Plus. Maybe I'm just sleep-deprived but I can't seem to get this code to work:

$(document).ready(function() {
var div = $("

");
var image = $('.postbody img');
image.appendTo(div);
image.detach();
image.hide();
var button = document.createElement("input");
    button.setAttribute("type","button");
    button.setAttribute("value","Image");
    button.setAttribute("class","button2 btnlite");
    $(button).click(function (){
    $(image).toggle();
     });
div.appendTo($('.postbody'));
button.appendTo($(this));

});
On another note, the GUI for HC Plus is coming along slowly. Bit of a learning curve understanding some of these new methods and callback functions. Help from other coders is helping me to learn a lot.

I also managed to tweak the image resizer for HC Plus. new code:
// Image Resize
function imageResize(){
$('.postbody img')
for (i=0; i<$(this).length; i++) {
if ($(this).style.maxWidth >= '400' + 'px' || $(this).style == undefined)    {
    $('cssText').css($(this), "{ max-width: 500px; height: auto;}");
    $(this)[i].addEventListener('click', function(event) {
        if (event.currentTarget.style.Maxwidth == 'none')
            event.currentTarget.style.maxWidth = '400' + 'px';
            else
            event.currentTarget.style.maxWidth = 'none';    }, false);

        } 
    }
}

I'm so out of practice it's pathetic.