Posts

Showing posts from 2011

Opera Fullscreen Autoshow/hide Toolbar

Image
Another thing missing from Opera is the fullscreen mode autoshow/hide toolbar. Yes, there are ways to show and autohide the toolbars with delay using keyboard shortcuts and mouse gestures as described here, however, often time we (especially netbook users) just want to use our mouse to show the address bar or tab bar to navigate back/forward or to switch tabs.

So, my idea is, when we go to fullscreen mode, we add a handler to detect when the mouse reach the top of the screen, and when it does, we would like to send Opera the show toolbars shortcut. I have searched through Opera Extensions API if there is a way to send an internal Opera action command through an extension, but so far the result is none. So, finally, I decided to utilize Autohotkey to the rescue. Basically I wrote a script to detect when Opera is active, and detect when mouse position reach top of the page, then send the keyboard shortcut to Opera.

#NoTrayIcon ; Uncomment this line to show Tray Icon
#Persistent
SetTimer,…

iFrame Opera Extension (Updated for Opera 39)

Image
My First Ever Published Opera Extension :D

https://addons.opera.com/en/addons/extensions/details/iframe/

Based on my previous post, iFrame bookmarklet, with added capability to resize and move the iFrame

Try Opera, and try my extension :)


Update Version 0.6-0.7: After 3+ years, I finally found the time to edit this extension to work with the new version of Opera (Chromium). Tested and Published for Opera 39. I don't know how many will actually come back and reuse this extension, but well, at least I'm using it extensively myself :)

Browsing with iFrame

For me, Opera is (almost) perfect. The only thing missing is an extension like Firefox's CoolPreviews or Google Chrome's extension ezLinkPreview. So here I end up writing it myself ... a simple inside Frame browsing. The idea is basically if you have several links on a page (like Google search results) instead of clicking a link, go back, click another link, go back, you can just open an iframe (still on the same page) to "preview" the destination link, and when you decide to browse the entire content, you just need to click the actual link to load the whole page. This is very helpful when browsing pages with hundred links, such as Craigslist!!

How to use: Drag this bookmarklet to your bookmark bar, and click it when you are on a page that you need the iFrame. When you hover on a link, it will display a small box on the right side of the link, which you can click to open the preview frame. Click outside the frame to close it, or hover and click on another link.

iFrame…

Get Images Bookmarklet

I wonder why all Internet browsers do not provide us with a built-in and simple way to download multiple images, such as those excellent photos from my favorite Boston.com's The Big Picture. The closest thing that fit my need is Bulk Image Downloader and Firefox Extensions (Image Picker). The thing is, I certainly don't want to pay for something that can be free, and secondly, I don't use Firefox as my primary Internet browser (Hail Opera!)

My first plan was to make an Opera extension similar to Firefox's Image Picker, which basically read a page, select the images and then call the built-in download manager to save it to local folder. However, I'm having a real hard time finding the Opera API function to call the Opera download manager to download even a single url. So, I end up writing just this simple bookmarklet to grab the images url, and execute Free Download Manager to perform the download. For now, the bookmarklet only extract direct source url of images on…

FBNotify.py

#coding=utf-8 #FBNotify.py: Facebook Simple Notifier # by Herry Limantoro (mataherry@gmail.com) # #NOTE: Don't forget to Add the Mechanize source folder into your SL4A scripts folder (/mnt/sdcard/sl4a/scripts) # http://wwwsearch.sourceforge.net/mechanize/download.html import android import time import sys import traceback import urllib import mechanize import BeautifulSoup import re droid = android.Android() #Setup Browser br = mechanize.Browser() br.set_handle_redirect(True) br.set_handle_robots(False) #User Agent, can't do without it br.addheaders = [('User-agent','Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.1) Gecko/2008071615 Fedora/3.0.1-1.fc9 Firefox/3.0.1')] url = 'http://m.facebook.com/notifications.php' #Set username password here, leave blank to prompt for username/password username = '' password = '' #Set run interval (in minutes), prompt if 0 interval = 0 def get_interval(): droid.dialogCreateAlert('…

Android Facebook Simple Notifier using SL4A

Image
Like many Android phone users, I wonder why the Android Market Facebook app lacks push notifications like BB or iPhone. Currently it only notify when there is new message, or event and friend request. So, when I get acquainted with SL4A, this is the first app pop up in my mind. However, reading through the Facebook API and having to handle oAuth and stuffs seem just too much work. So, I thought if only I could open my mobile version of FB notification page (http://m.facebook.com/notifications.php) and read the new notifications, that would do it. And upon googling on emulate browser using python, I found these two excellent tutorials:
http://stockrt.github.com/p/emulating-a-browser-in-python-with-mechanize/
http://www.ibm.com/developerworks/linux/library/l-python-mechanize-beautiful-soup/

 I guess the neat trick is to "disguise" the User Agent of the mechanize Browser. From there on, it's basically parsing the HTML source behind the notification page. One last bit is detec…