endflow.net blog

/* programming and programming */

Archive for the ‘JS’ tag

Flickr Activate In-Place Editing for AutoPagerize

without comments

/* How does it work ? */

This Greasemonkey script activates in-place editing of the pages loaded by AutoPagerize.
flickr_ap
Read the rest of this entry »

Written by kuy

June 21st, 2008 at 1:50 am

Posted in Uncategorized

Tagged with , , ,

LDR Ad-Entry Blocker supports fLDR

without comments

/* LDR Ad-Entry Blocker */

supports fLDR.
LDR Ad-Entry Blocker [Userscrips.org]
I’ve checked it on Firefox 3.0 (GM 0.8) and Opera 9.5.

/* Reason */

The “contain” function that embedded in LDR on line 3 always return “false”.

titles.each(function(title){
    cfg.patterns.each(function(rx){
        if(contain(title.innerHTML, new RegExp(rx))){

So I fixed:

titles.each(function(title){
    cfg.patterns.each(function(rx){
        if((new RegExp(rx)).test(title.innerHTML)){

Like that.

/* Conclusion */

I thought that I shouldn’t use embedded functions.
However, I already made this using a lot of embedded functions. lol
Thank you “you”-san for reporting this issue.

enjoy LDR! ;)

Written by kuy

June 20th, 2008 at 12:38 am

Posted in Uncategorized

Tagged with , , , , , ,

NicoVideo My Ranking: Replace with your favorite ranking page

with 2 comments

/* How does it work ? */

This Greasemonkey script replaces the link of default ranking page with your favorite ranking page on NicoVideo (ニコニコ動画).

nvmyranking

In these weeks, I check the ranking page “Game, View, Daily” frequently. So I have to move 2 times from default ranking page “All, MyList, Daily” for this.
Read the rest of this entry »

Written by kuy

June 3rd, 2008 at 12:25 am

Posted in Uncategorized

Tagged with , , ,

How to run AutoPagerize on Safari for Windows?

with 2 comments

/* Introduction */

I’d like to introduce that how to run AutoPagerize on Safari for Windows.

ap_win_safari

Safari 3.1is very fast, but I think I can’t browse the internet without AutoPagerize. os0x released useful Bookmarklet. On the other hand, this way load automatically using Privoxy.

Read the rest of this entry »

Written by kuy

April 11th, 2008 at 4:22 am

GM: Play next video automatically on NicoVideo

with 3 comments

/* How does it work ? */

This Greasemonkey script add feature that jump to next video automaticaly on NicoVideo (ニコニコ動画).
Read the rest of this entry »

Written by kuy

April 8th, 2008 at 12:06 am

Posted in Uncategorized

Tagged with , , ,

LDR for Weather: Pretty-Printing livedoor weather feed

with 3 comments

/* How does it work ? */

This Greasemonkey script pretty-print the feed of livedoor Weather
LDR for Weather
Humm … I spent a lot of time for this scripts.

Update history

  • [2008-02-??] 0.1.0 first version
  • [2008-03-25] 0.2.0 improved: highlight today
  • [2008-03-26] 0.2.1 improved: optimized, cleaned
  • [2008-04-05] 0.2.2 bugfixed: sort by date (radix bug)

/* Install */

This script already uploaded to Userscripts.org. So please install it from this page.
ldr4weather.user.js

/* Settings */

Configurable items:

name description value type
limit Limit display number of days to table. Number
label Display weather name or not. true/false Boolean
interval Interval of clawling. Number
today Highlight color for today’s background. #0066EE or CSS color String

Sample settings

/////////////// configurations ////////////////
var cfg = {
	limit: {
		before: 7,
		after: 6
	},
	label: true,
	interval: {
		first: 50,
		default: 100
	},
	today: '#FFAA59'
}
///////////////////////////////////////////////

/* Conclusion */

As you know, this script doesn’t have generality.
However, I have more feeds I want to apply specific script.
For instance, Secunia. I want to classify and filter the entry of it.
I know you say “Go website!”.

My LDR like emacs …
Well, I’d like to make new script to post message to Twitter from LDR.
And I’m looking for “Ore-Ore LDR”.

enjoy LDR! ;)

Written by kuy

April 4th, 2008 at 10:03 pm

Posted in Uncategorized

Tagged with , , ,

LDR Feed Info: Add feed indicator

without comments

/* How does it work ? */

This Greasemonkey script add feed information to livedoor Reader.

ldr feed info

/* Install */

This script already uploaded to Userscripts.org. So please install it from this pase.

ldr_feed_info.user.js

/* Settings */

There is no configurable item.
Only install and use!

/* Conclusion */

I have to thank them.
$x function is utility for XPath. This function return the result as Array object. So we can enumerate elements easily as usual. Very thanks! cho45!
addBefore function is utility for injecting any code into existing code. In this time, I’d created addAfter function reffered addBefore function. Very thanks! brasil!
And very very thank you all using my scripts!
Feel free to comment.

enjoy LDR! ;)

Written by kuy

March 23rd, 2008 at 10:48 am

Posted in Uncategorized

Tagged with , , ,

RTM Keyconfig: Change keyboard shortcuts of Remember The Milk

with 5 comments

/* How does it work ? */

This Greasemonkey script add / modify / remove keyboard shortcuts of Remember The Milk you want.

Remember The Milk (RTM) is useful task management tool. It has keyboard shortcuts and you can execute all operations via keyboard. However we can’t customize keyboard shortcuts.
I always push “Esc” key when I want to clear selection.
So I created this Greasemonkey.

/* Install */

This script already uploaded to Userscripts.org. So please install it from this pase.
rtmkeyconfig.user.js

/* Settings */

name description value type
keys A string of keyboard shortcut and function. An array contains an array of string of keyboard shortcut and function. Array(Array)
interval Retry interval. millisecond. I recommend default value. In usually, It has the range 100 to 5000. Number

Sample setting

var cfg = {
	keys: [
		["esc", "taskList.taskSelectNone()"],
		["space", "this.keyboardEntrySelect(ev)"],
		["j", function(){
			var list = view.getViewList();
			if(list.keyboardPosition + 1 != list.entries.length){
				list.keyboardDown();
			}
		}],
		["k", function(){
			var list = view.getViewList();
			if(list.keyboardPosition != 0){
				list.keyboardUp();
			}
		}],
		["ctrl+d", "pagedown", function(){
			var list = view.getViewList();
			for(var i = 0; i < 5; i++){
				if(list.keyboardPosition + 1 == list.entries.length){break}
				list.keyboardDown();
			}
		}],
		["ctrl+u", "pageup", function(){
			var list = view.getViewList();
			for(var i = 0; i < 5; i++){
				if(list.keyboardPosition == 0){break}
				list.keyboardUp();
			}
		}],
		["l", "tab", function(){
			var tabs = view.getViewTabs();
			if(tabs.selected != tabs.entries.length - 1){
				tabs.selectRight();
			}
		}],
		["h", "shift+tab", function(){
			var tabs = view.getViewTabs();
			if(tabs.selected != 0){
				tabs.selectLeft();
			}
		}],
		["u", "control.undoLastAction()"]
	],
	interval: 250
}

/* Conclusion */

enjoy Remember The Milk! ;)

Written by kuy

February 10th, 2008 at 8:20 pm

Posted in Uncategorized

Tagged with , , , ,

LDR Ad-Entry Blocker: Block offecsive Ad-Entries!

with 19 comments

/* How does it work ? */

This Greasemonkey script block advertisement entries such as “AD: …”, “PR: …” on LDR.

Update history

  • 0.1.2 [2008-02-01]: first release
  • 0.1.3 [2008-02-01]: supported Opera
  • 0.1.4 [2008-06-19]: supported fLDR

LDR is useful tool for me. However, some RSS include advertisement entries. Of course I skip these entries but I feel it is annoying.
So I made this.

/* Install */

This script already uploaded to Userscripts.org. So please install it from this page.

ldr_adentry_blocker.user.js

/* Settings */

Configurable items:

name description value type
patterns Blocker search these ads pattern in entry title. RegExp Array(RegExp)
style Blocker apply this style to the element of entry title. valid style name and value Object
interval The interval of crawling to find ad-entry. 0 to Number.MAX_VALUE Number
skip skip ad-entry when press “j/k” if you set true. true/false Boolean

Sample settings

/////////////// configurations ////////////////
var cfg = {
	// judgement patterns of entry title
	patterns: [/^[s【]*(AD|PR|AD|PR)[s】]*[::]/i],
	// advertisement entries style (apply this style to title link <a>)
	style: {
		color: '#aaa',
		fontSize: '12px'
	},
	// apply interval
	interval: 1000,
	// skip ad-entry
	skip: true
}
///////////////////////////////////////////////

In case of default setting, Blocker will remove entry body and change title color to grey. If you want remove completely, you change “style” setting.

/* Conclusion */

I have made this Greasemonkey script 2 months ago. I think I have to upload more because I have many scrips doesn’t upload yet.

enjoy LDR ! Wink

Written by kuy

February 1st, 2008 at 4:28 pm

Posted in Uncategorized

Tagged with , , , , ,

Norikae-Annai Improver

without comments

/* How does it work ? */

This Greasemonkey script improves UI for Norikae-Annai.

Update history

  • 0.1.0 [2008.01.24]: first release
  • 0.1.1 [2008.01.29]: supported Opera

Norikae-Annai is pretty good tool for me.
Recently, Jordan released new version of Norikae-Annai.
However, I think it has some rooms of improvements.

  • Default tab index order of input
  • Doesn’t focus on “from” textbox on page loaded

So I created Greasemonkey.
It will change following point.

  • Change tab focus orderlike this “from -> to -> search button”
  • Set focus on “from” textbox on page loaded

/* Install */

This script already uploaded to Userscripts.org. So please install it from this page.
There are no settings.

norikaeannai_improver.user.js

enjoy Norikae-Annai ! ;)

Written by kuy

January 29th, 2008 at 7:00 pm

Posted in Uncategorized

Tagged with , , ,