Extensions
: K-Meleon Forum
All about K-Meleon extensions.
Goto:
Forum List
•
Message List
•
Search
•
Log In
Your Name:
Subject:
Help information
BBcode help
Smileys help
[quote=JamesD] @ mslayer You are right about my 'index()' statement. Was too late at night for old guy like me. Regarding the 'while' loop, it could look like this. [code] _OpenCleanlink { alert($LinkURL, "The highlighted link", INFO); $_OpenCleanURL = $LinkURL ; $_OpenCleanPos = 0 ; while($_OpenCleanPos != -1) { $_OpenCleanPos = index( $_OpenCleanURL, "&url=http"); if ($_OpenCleanPos > 0 ) { $_OpenCleanURL = substr( $_OpenCleanURL, $_OpenCleanPos +5 ); alert($_OpenCleanURL, "$_OpenCleanURL DEBUG", INFO); } } $kTabs?opentab( $_OpenCleanURL ):opennew( $_OpenCleanURL ); } [/code] Pos is zero so the while will operate once. If it finds "&url=http" Pos will will be a positive integer. In that case substr changes URL to be the remainder of itself. Since Pos is not -1 while will loop again. When no more instances of "&url=http", index() will set Pos to -1 and the while loop will stop.[/quote]
[Please Enable JavaScript]
K-Meleon forum is powered by
Phorum
.
Home/News
Screenshots
Download
Documentation
Resources
Get Involved
Forum
Bugs
Development