General :  K-Meleon Web Browser Forum
General discussion about K-Meleon 
ietab supplement (dakota deer watchers)
Posted by: disrupted
Date: September 03, 2009 12:54AM

http://kmext.sourceforge.net/files/ietabsup.7z

adds additional menus to ease browsing in ietab session
access from tools>privacy>ietab options

includes extra menus that add menus open link and open page in km or in ietab in internet exploder's context menu so when you want to open a link in an ietab, click on open link in ietab or when you want to end ietab session and open link in kmeleon(wise choice); click on open link in kmtab..same goes for opening the current page. deselecting extra menus removes them from ie's context menu. additional menus to block flash, javascripts etc utilises nirsoft ie viewer for cache viewing

because everything in ie functions from the registry, this extension requires admin privileges on windows 2000 and xp and it will probably make vista go nuts..test on vista to see if it can work there or not







# K-Meleon Macros (http://kmeleon.sourceforge.net/wiki/index.php?id=MacroLanguage)

# -------ietab supplement: additional features for ietab---------------

$_tool_path=getfolder(RootFolder)."\\Tools";

ie_extramenu{
menuchecked=getpref(BOOL,"kmeleon.ietabextra.active");
togglepref(BOOL,"kmeleon.ietabextra.active");
$checkava=getpref(BOOL,"kmeleon.ietabextra.active");
$disabled=("false");
$checkava==$disabled?&extrasupoff:&extrasupon;
}

extrasupoff{
exec($_tool_path."\\ietabsup\\ietabsup.exe ");
statusbar("ietab extra menus disabled");
}

extrasupon{
exec($_tool_path."\\ietabsup\\ietabsup.exe extramenus");
statusbar("ietab extra menus enabled");
}

ie_scripting{
menuchecked=getpref(BOOL,"kmeleon.iescripting.active");
togglepref(BOOL,"kmeleon.iescripting.active");
$checkava=getpref(BOOL,"kmeleon.iescripting.active");
$disabled=("false");
$checkava==$disabled?&scripton:&scriptoff;
}

scriptoff{
exec($_tool_path."\\ietabsup\\ietabsup.exe disscript");
statusbar("ie scripting disabled");
}

scripton{
exec($_tool_path."\\ietabsup\\ietabsup.exe enscript");
statusbar("ietab scripting enabled");
}

ie_flash{
menuchecked=getpref(BOOL,"kmeleon.ieflash.active");
togglepref(BOOL,"kmeleon.ieflash.active");
$checkava=getpref(BOOL,"kmeleon.ieflash.active");
$disabled=("false");
$checkava==$disabled?&flashon:&flashoff;
}

flashoff{
exec($_tool_path."\\ietabsup\\tflash.exe off");
statusbar("ie flash animation disabled");
}

flashon{
exec($_tool_path."\\ietabsup\\tflash.exe on");
statusbar("ietab flash animation enabled");
}

clear_iecache{
exec($_tool_path."\\ietabsup\\ietabsup.exe clear");
statusbar("ietab scripting enabled");
}

view_iecache{
exec($_tool_path."\\ietabsup\\iecacheview\\iecacheview.exe");
statusbar("ietab scripting enabled");
}

ieoptionen{
exec("C:\\WINDOWS\\SYSTEM32\\rundll32.exe shell32.dll,Control_RunDLL inetcpl.cpl");
}

localz{
exec("C:\\WINDOWS\\SYSTEM32\\rundll32.exe shell32.dll,Control_RunDLL inetcpl.cpl,,1");
}

ietabsups_BuildMenu{
setmenu("&Privacy",inline,ietab_extra,4);
setmenu(ietab_extra, popup, "IETab Options");
setmenu("IETab Options", macro, "Extra Menus", ie_extramenu);
setmenu("IETab Options", separator,-1);
setmenu("IETab Options", macro, "Block Jscript", ie_scripting);
setmenu("IETab Options", macro, "Block Flash", ie_flash);
setmenu("IETab Options", separator,-1);
setmenu("IETab Options", macro, "View Cache", view_iecache);
setmenu("IETab Options", macro, "Clear Cache", clear_iecache);
setmenu("IETab Options", separator,-1);
setmenu("IETab Options", macro, "IExploit Zones", localz);
setmenu("IETab Options", macro, "IExploit Options", ieoptionen);
}

$OnInit=$OnInit."ietabsups_BuildMenu;";
# --------------------------------------------------------------------
$macroModules=$macroModules."ietab_sups;";



; AutoIt Version: 3.3.0
; Language: Englisch
; Platform: Win9x/NT
; Author: yanni
;refiejspage=shell.run("\"G:\\applications-x\\KMplus\\k-meleon.exe\" \"" + "chrome://ietab/content/reloaded.html?url=" + external.menuArguments.document.URL + "\"");

;refiejspage=shell.run("\"G:\\applications-x\\KMplus\\k-meleon.exe\" \"" + "chrome://ietab/content/reloaded.html?url=" + location + "\"");

#NoTrayIcon
#Include <File.au3>
#Include <String.au3>

$ietablink=(@scriptdir & "\ietablink.html")
$ietabpage=(@scriptdir & "\ietabpage.html")
$kmlink=(@scriptdir & "\kmlink.html")
$kmpage=(@scriptdir & "\kmpage.html")
$iechrome=("chrome://ietab/content/reloaded.html?url=")


$findkmpend=StringTrimRight(@scriptdir ,14)
$getkm=($findkmpend & "k-meleon.exe")

$jsvalidate=StringReplace($getkm, "\", "\\")

$kmjspage=("shell.run(" & """" & "\" & """" & $jsvalidate & "\" & """" & " \" & """" & """" & " + external.menuArguments.document.URL + " & """" & "\" & """" & """" & ");")

$kmjslink=("shell.run(" & """" & "\" & """" & $jsvalidate & "\" & """" & " \" & """" & """" & " + location + " & """" & "\" & """" & """" & ");")

$iejspage=("shell.run(" & """" & "\" & """" & $jsvalidate & "\" & """" & " \" & """" & """" & " + " & """" & $iechrome & """" & " + external.menuArguments.document.URL + " & """" & "\" & """" & """" & ");")

$iejslink=("shell.run(" & """" & "\" & """" & $jsvalidate & "\" & """" & " \" & """" & """" & " + " & """" & $iechrome & """" & " + location + " & """" & "\" & """" & """" & ");")

;MsgBox(4096, "Test", $iejspage)
$fcheck=FileExists($getkm)

if $fcheck=1 then
_FileWriteToLine($ietablink, 5, $iejslink, 1)
_FileWriteToLine($ietabpage, 4, $iejspage, 1)
_FileWriteToLine($kmlink, 5, $kmjslink, 1)
_FileWriteToLine($kmpage, 4, $kmjspage, 1)
resume()
else
MsgBox(48, "error", "there seems to be a problem. can't find k-meleon binary. make sure to extract this extension in its proper folders. ")
endif

func resume()
if $CmdLine[0]=0 Then
removesups()
Else
chkcommand()
EndIf
Exit
endfunc

func chkcommand()
if $cmdline[1]=("extramenus") then
addsups()
elseif $cmdline[1]=("disscript") then
disscript()
else
morecommands()
endif
endfunc


Func removesups()
RegDelete("HKCU\Software\Microsoft\Internet Explorer\MenuExt\Open Link>IEtab")
RegDelete("HKCU\Software\Microsoft\Internet Explorer\MenuExt\Open Link>KMtab")
RegDelete("HKCU\Software\Microsoft\Internet Explorer\MenuExt\Open Page>IEtab")
RegDelete("HKCU\Software\Microsoft\Internet Explorer\MenuExt\Open Page>KMtab")
exit
endfunc

Func addsups()
RegWrite("HKCU\Software\Microsoft\Internet Explorer\MenuExt\Open Link>IEtab", "", "REG_SZ", $ietablink)
RegWrite("HKCU\Software\Microsoft\Internet Explorer\MenuExt\Open Link>IEtab", "contexts", "REG_DWORD", "34")
RegWrite("HKCU\Software\Microsoft\Internet Explorer\MenuExt\Open Link>KMtab", "", "REG_SZ", $kmlink)
RegWrite("HKCU\Software\Microsoft\Internet Explorer\MenuExt\Open Link>KMtab", "contexts", "REG_DWORD", "34")
RegWrite("HKCU\Software\Microsoft\Internet Explorer\MenuExt\Open Page>IEtab", "", "REG_SZ", $ietabpage)
RegWrite("HKCU\Software\Microsoft\Internet Explorer\MenuExt\Open Page>IEtab", "contexts", "REG_DWORD", "1")
RegWrite("HKCU\Software\Microsoft\Internet Explorer\MenuExt\Open Page>KMtab", "", "REG_SZ", $kmpage)
RegWrite("HKCU\Software\Microsoft\Internet Explorer\MenuExt\Open Page>KMtab", "contexts", "REG_DWORD", "1")
exit
endfunc

func disscript()
RegWrite("HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\3", "1400", "REG_DWORD", "3")
exit
endfunc

func morecommands()
if $cmdline[1]=("enscript") then
RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\3", "1400", "REG_DWORD", "0")
elseif $cmdline[1]=("clear") then
$iecache=(@scriptdir & "\iecache\iecache.exe /DELETE")
run($iecache, "", @sw_hide)
else
exit
endif
exit
endfunc



javascript pages to send url to ietab or kmtab (paths are automatically changed by autoitscript according to where your k-meleon is installed)
<SCRIPT LANGUAGE="JavaScript">
function runK(location) {

var shell = new ActiveXObject("WScript.Shell");
shell.run("\"G:\\applications-x\\KMplus\\k-meleon.exe\" \"" + "chrome://ietab/content/reloaded.html?url=" + location + "\"");

}

var oWindow = window.external.menuArguments;
if (oWindow != null) {
var oDocument = oWindow.document;
var sText = null;

var oEvent = oWindow.event;
if ((oEvent.type == "MenuExtUnknown") || (oEvent.type == "MenuExtImage") || (oEvent.type == "MenuExtAnchor")) {
var oElement = oDocument.elementFromPoint(oEvent.clientX, oEvent.clientY);
var oAnchor = oElement;
while ((oAnchor.tagName != "A") && (oAnchor.tagName != "AREA") && (oAnchor.tagName != "HTML")) {
oAnchor=oAnchor.parentElement;
}

if (oAnchor.tagName=="A" || oAnchor.tagName=="AREA") {
sText = oAnchor.href;
} else if (oAnchor.tagName=="HTML" && oElement.tagName=="IMG") {
sText = oElement.src;
}
}


if ((sText != null) && (sText.length != 0)) {
var location = new String(sText);
runK(location);
}
}
</SCRIPT>


<SCRIPT LANGUAGE="JavaScript">

var shell = new ActiveXObject("WScript.Shell");
shell.run("\"G:\\applications-x\\KMplus\\k-meleon.exe\" \"" + "chrome://ietab/content/reloaded.html?url=" + external.menuArguments.document.URL + "\"");
</SCRIPT>


<SCRIPT LANGUAGE="JavaScript">
function runK(location) {

var shell = new ActiveXObject("WScript.Shell");
shell.run("\"G:\\applications-x\\KMplus\\k-meleon.exe\" \"" + location + "\"");

}

var oWindow = window.external.menuArguments;
if (oWindow != null) {
var oDocument = oWindow.document;
var sText = null;

var oEvent = oWindow.event;
if ((oEvent.type == "MenuExtUnknown") || (oEvent.type == "MenuExtImage") || (oEvent.type == "MenuExtAnchor")) {
var oElement = oDocument.elementFromPoint(oEvent.clientX, oEvent.clientY);
var oAnchor = oElement;
while ((oAnchor.tagName != "A") && (oAnchor.tagName != "AREA") && (oAnchor.tagName != "HTML")) {
oAnchor=oAnchor.parentElement;
}

if (oAnchor.tagName=="A" || oAnchor.tagName=="AREA") {
sText = oAnchor.href;
} else if (oAnchor.tagName=="HTML" && oElement.tagName=="IMG") {
sText = oElement.src;
}
}


if ((sText != null) && (sText.length != 0)) {
var location = new String(sText);
runK(location);
}
}
</SCRIPT>


<SCRIPT LANGUAGE="JavaScript">

var shell = new ActiveXObject("WScript.Shell");
shell.run("\"G:\\applications-x\\KMplus\\k-meleon.exe\" \"" + external.menuArguments.document.URL + "\"");
</SCRIPT>


Options: ReplyQuote


K-Meleon forum is powered by Phorum.