[ PHALKUNZ'S BLOG ]

I've moved to http://phalkunz.com. You'll be redirect to my new blog soon.

Showing posts with label howtos. Show all posts
Showing posts with label howtos. Show all posts

Thursday, May 24, 2007

I'm The Biggest Procrastinator But ...

I'm addressing my procrastination and trying to manage it. I've been quite productive in terms of my thesis in the last few days. I knew I needed some help on doing this and found an article on how to stop procrastinating. If you realize that you always leave your important work that needs to get done behind and do other things instead, that article is for you.
Continue reading...

Monday, May 21, 2007

Download/Save Unsavable Flickr Photos

Has it ever happened to you when you tried to save a flickr photo but you ended up saving another blank image file called "spaceball.gif" instead? I don't exactly know what flickr is trying to do. Preventing people from downloading those photos? Maybe. What flickr does is it uses another transparent image to overlay the main image to block users from downloading the actual image. Is there a way to get around it? Yeah of course. It's no wonder that if you can download youtube videos, you must be able to save protected flickr photos somehow. There are a few ways you can do this. One approach is to screenshot and then use image editing application to crop the part that you want but believe me it's such a pain in the arse. Another one is to actually read the code and extract the real image url and the paste it to browser address bar but i'm sure you don't wanna do this. Ok enough of all that hassle. I've written a few lines of javascript code that can be plugged into Greasemokey to display an actual link to the image. The code is written as follows:


// ==UserScript==
// @name SaveFlickrImg
// @namespace http://phalkunz.blogspot.com
// @description Displays a download link for an unsavable flickr photo
// @include http://www.flickr.*/*
//
// ==/UserScript==

var imgsrc;
var img;
var imgParent;
var flag = false;

var imgs = document.images;
for (var i=0; i<imgs.length; i++) {
var src = imgs[i].getAttribute("class");
if (src=="reflect"){
img = imgs[i];
imgParent = img.parentNode;
imgsrc=imgs[i].getAttribute("src");
flag = true;
}
}

if (flag) {
var my_banner = document.createElement("div");
my_banner.innerHTML = '<div style="border-bottom: 1px solid #333333; margin-bottom: 10px; font-size: small; background-color: #336699; color: #FFFFFF;>' +
'<p style="margin:0px;padding: 5px;">' +
' <a href="' + imgsrc + '" style="color:#FFFFFF; font-weight:bold; font-size:10px;">main image link</a>' +
'</p></div>';
imgParent.appendChild(my_banner);
}



Save that code as, for example, saveFlickrPhoto.user.js and install that file in greasemonkey. That's it. Go to that flickr photo that you couldn't download but this time it will show a link under the photo. That's it. I'm sure you know how to do it from there.
Continue reading...

Monday, October 30, 2006

Disable Annoying Firefox Tooltips

[Update: I've moved to a space now (http://phalkunz.com/). Please post your comment on my new blog. This post on my new blog is at http://phalkunz.com/2006/10/30/disable-annoying-firefox-tooltips/]

Drag-and-Drop is the beauty of the GUI but sometimes other thing gets in the way that makes it useless. The most annoying drag-and-drop I have ever come across is when I try to drag the address of a website (by dragging the icon) from the firefox address box and place it on the bookmark toolbar folder but before I drop it in the folder a tooltip with a message "drag and drop this icon to create a link to this page". It sounds good, right? The folder I wanna place a bookmark is under that tooltip. After I drop the link and I check the folder the link it's not even there because that tooltip block it from going in. I was like grrrrrrr. I think this happens to mac version only. But lucky enough, firefox provides a way to turn it off. Go type "about:config" in the address box and hit the enter. It shows a list of configurable feature, find "browser.chrome.toolbar_tips" item and double-click to turn it value to false. That's set.

[Update: I've moved to a space now (http://phalkunz.com/). Please post your comment on my new blog. This post on my new blog is at http://phalkunz.com/2006/10/30/disable-annoying-firefox-tooltips/]
Continue reading...