Hi
Well, then GreaseMonkey can do much more for you.
Code:
[red]<!DOCTYPE[/red] [maroon]html[/maroon][red]>[/red]
[b]<html>[/b]
[b]<head>[/b]
[b]<meta[/b] [maroon]charset[/maroon][teal]=[/teal][green][i]"UTF-8"[/i][/green][b]>[/b]
[b]<title></title>[/b]
[b]</head>[/b]
[b]<body>[/b]
[b]<form[/b] [maroon]action[/maroon][teal]=[/teal][green][i]"#"[/i][/green] [maroon]id[/maroon][teal]=[/teal][green][i]"navi"[/i][/green][b]>[/b]
[b]<input[/b] [maroon]type[/maroon][teal]=[/teal][green][i]"button"[/i][/green] [maroon]value[/maroon][teal]=[/teal][green][i]"PREV"[/i][/green] [maroon]id[/maroon][teal]=[/teal][green][i]"prev"[/i][/green][b]>[/b]
[b]<input[/b] [maroon]type[/maroon][teal]=[/teal][green][i]"text"[/i][/green] [maroon]name[/maroon][teal]=[/teal][green][i]"number"[/i][/green] [maroon]id[/maroon][teal]=[/teal][green][i]"number"[/i][/green][b]>[/b]
[b]<input[/b] [maroon]type[/maroon][teal]=[/teal][green][i]"button"[/i][/green] [maroon]value[/maroon][teal]=[/teal][green][i]"NEXT"[/i][/green] [maroon]id[/maroon][teal]=[/teal][green][i]"next"[/i][/green][b]>[/b]
[b]</form>[/b]
[b]<ul[/b] [maroon]id[/maroon][teal]=[/teal][green][i]"list"[/i][/green][b]></ul>[/b]
[b]<iframe[/b] [maroon]id[/maroon][teal]=[/teal][green][i]"render"[/i][/green] [maroon]style[/maroon][teal]=[/teal][green][i]"display: none"[/i][/green][b]></iframe>[/b]
[b]</body>[/b]
[b]</html>[/b]
Code:
[gray]// ==UserScript==[/gray]
[gray]// @name Rick[/gray]
[gray]// @include [URL unfurl="true"]http://localhost/remote.htm[/URL][/gray]
[gray]// @include file:///home/rick/remote.htm[/gray]
[gray]// ==/UserScript==[/gray]
[b]function[/b] [COLOR=darkgoldenrod]go[/color][teal]([/teal]direction[teal])[/teal]
[teal]{[/teal]
[b]var[/b] number[teal]=[/teal]document[teal].[/teal][COLOR=darkgoldenrod]getElementById[/color][teal]([/teal][green][i]'number'[/i][/green][teal])[/teal]
[b]var[/b] nr[teal]=[/teal][COLOR=darkgoldenrod]parseInt[/color][teal]([/teal]number[teal].[/teal]value[teal],[/teal][purple]10[/purple][teal])[/teal]
[b]if[/b] [teal]([/teal][COLOR=darkgoldenrod]isNaN[/color][teal]([/teal]nr[teal]))[/teal] nr[teal]=[/teal][purple]0[/purple]
nr[teal]+=[/teal]direction
number[teal].[/teal]value[teal]=[/teal]nr
[COLOR=darkgoldenrod]GM_xmlhttpRequest[/color][teal]([/teal][teal]{[/teal]
method[teal]:[/teal][green][i]'GET'[/i][/green][teal],[/teal]
url[teal]:[/teal][green][i]'[URL unfurl="true"]http://tek-tips.com/threadminder.cfm?pid=216&page='[/URL][/i][/green][teal]+[/teal]nr[teal],[/teal]
onload[teal]:[/teal]process
[teal]}[/teal][teal])[/teal]
[teal]}[/teal]
[b]function[/b] [COLOR=darkgoldenrod]process[/color][teal]([/teal]response[teal])[/teal]
[teal]{[/teal]
[b]var[/b] render[teal]=[/teal]document[teal].[/teal][COLOR=darkgoldenrod]getElementById[/color][teal]([/teal][green][i]'render'[/i][/green][teal])[/teal]
[b]var[/b] list[teal]=[/teal]document[teal].[/teal][COLOR=darkgoldenrod]getElementById[/color][teal]([/teal][green][i]'list'[/i][/green][teal])[/teal]
render[teal].[/teal]contentDocument[teal].[/teal]body[teal].[/teal]innerHTML[teal]=[/teal]response[teal].[/teal]responseText
[b]var[/b] thread[teal]=[/teal]render[teal].[/teal]contentDocument[teal].[/teal][COLOR=darkgoldenrod]getElementsByClassName[/color][teal]([/teal][green][i]'ttype1'[/i][/green][teal])[/teal]
[b]while[/b] [teal]([/teal]list[teal].[/teal]firstChild[teal])[/teal] list[teal].[/teal][COLOR=darkgoldenrod]removeChild[/color][teal]([/teal]list[teal].[/teal]firstChild[teal])[/teal]
[b]for[/b] [teal]([/teal][b]var[/b] i[teal]=[/teal][purple]0[/purple][teal],[/teal]l[teal]=[/teal]thread[teal].[/teal]length[teal];[/teal]i[teal]<[/teal]l[teal];[/teal]i[teal]++)[/teal] [teal]{[/teal]
[b]var[/b] item[teal]=[/teal]document[teal].[/teal][COLOR=darkgoldenrod]createElement[/color][teal]([/teal][green][i]'li'[/i][/green][teal])[/teal]
item[teal].[/teal]innerHTML[teal]=[/teal]thread[teal][[/teal]i[teal]].[/teal]innerHTML
list[teal].[/teal][COLOR=darkgoldenrod]appendChild[/color][teal]([/teal]item[teal])[/teal]
[teal]}[/teal]
[teal]}[/teal]
document[teal].[/teal][COLOR=darkgoldenrod]getElementById[/color][teal]([/teal][green][i]'prev'[/i][/green][teal]).[/teal][COLOR=darkgoldenrod]addEventListener[/color][teal]([/teal][green][i]'click'[/i][/green][teal],[/teal][b]function[/b][teal]([/teal]e[teal])[/teal] [teal]{[/teal] [COLOR=darkgoldenrod]go[/color][teal](-[/teal][purple]1[/purple][teal])[/teal] [teal]}[/teal][teal],[/teal][b]false[/b][teal])[/teal]
document[teal].[/teal][COLOR=darkgoldenrod]getElementById[/color][teal]([/teal][green][i]'next'[/i][/green][teal]).[/teal][COLOR=darkgoldenrod]addEventListener[/color][teal]([/teal][green][i]'click'[/i][/green][teal],[/teal][b]function[/b][teal]()[/teal] [teal]{[/teal] [COLOR=darkgoldenrod]go[/color][teal]([/teal][purple]1[/purple][teal])[/teal] [teal]}[/teal][teal],[/teal][b]false[/b][teal])[/teal]
Some explanation :
[ul]
[li]GreaseMonkey is a browser extension. It handles a set of scripts based on your instructions. Those scripts are almost regular JavaScript files with a metatag section. In the metatag section's [tt]@include[/tt] and [tt]@exclude[/tt] rules you tell to which URLs that script pertain and to which not. ( Read about the
Include and exclude rules for more details. )[/li]
[li]When you visit a page, after the page
finished loading, GreaseMonkey searches for the current URL in the active scripts' [tt]@include[/tt] and [tt]@exclude[/tt] rules. The scripts which pertain to that URL are executed in the current document's context.[/li]
[li]In the above script the 1
st [tt]@include[/tt] rule can be used if you have a web server running locally. For this you must have the remote.htm file in your web server's document root directory. ( Actually any web server will work. You can even use one where you have no access by changing rick.user.js to recreate remote.htm's important parts inside any document. Local web server is better for faster loading. )[/li]
[li]The 2
nd [tt]@include[/tt] rule can be used if you
not have a web server running locally. For this you must have the remote.htm file in the specified directory and the [tt]greasemonkey.fileIsGreaseable[/tt] preference turned on in about:config.[/li]
[li]You can freely edit the file names, paths and domains as long as the [tt]@include[/tt] rules contain correct information.[/li]
[/ul]
Regarding the installation :
[ul]
[li]create the remote.htm file in the specified directory with the above content [/li]
[li]install GreaseMonkey[/li]
[li]visit remote.htm[/li]
[li]from the GreaseMonkey's menu execute the
New User Script... command and put the above content into the created file[/li]
[li]if you want to use it without web server go to about:config and set [tt]greasemonkey.fileIsGreaseable[/tt] to True[/li]
[li]reload remote.htm[/li]
[li]then pushing the buttons should work ( will just list the threads of this forum )[/li]
[/ul]
Tested with
GreaseMonkey 0.9.5 in FireFox 4.0.1 on Linux. For other browsers see
Equivalents for other browsers section in the GreaseMonkey Wikipedia article.
Feherke.