Quote
c-sanchez
I am looking for some macro/extesion for km74, I would appreciate if any attached to a message.
I wonder if there is any updated version of AdBlock Plus to km74.
...
Excuse my English and thanks for the attention.
Sorry for late answer.
No worry about English. Most here are not speaking English except what we learned in school.
I have no knowledge about the Adblock extension. Try to use the Firefox version!
Or wait till Wladimir Palant updates the K-Meleon specific one.
You can probably use the switcher from 1.5.4's called useragent.kmm to get the same service as e.g. Firefox. I hope that is good enough.
It relies on code that used to be in I10n.js section Privacy.
Maybe put it into a separate file and call it UserAgents.js. It would be placed in
./k-Meleon/browser/preferences/UserAgents.js
/********************************************************************************************************/
// Privacy
# UserAgent.js for Mozilla/5.0 (Windows NT 5.1; rv:24.3) Gecko/20140105 K-Meleon/74.0
pref("kmeleon.privacy.useragent1.name", "Firefox 24 ESR");
pref("kmeleon.privacy.useragent1.string", "Mozilla/5.0 (Windows NT 5.1; rv:24.3) Gecko/20100101 Firefox/24.3");
pref("kmeleon.privacy.useragent2.name", "SeaMonkey");
pref("kmeleon.privacy.useragent2.string", "Mozilla/5.0 (Windows NT 5.1; rv:27.0) Gecko/20100101 Firefox/27.0 SeaMonkey/2.24");
Else You place this string into any of the js in the 4 preferences *.js or create one new js for the setting.
pref("general.useragent.override", "Mozilla/5.0 (Windows NT 5.1; rv:24.3) Gecko/20140105 Firefox/24.3 K-Meleon/74.0");
The later is the way advocated by Mozilla.org.
So for example a current SeaMonkey would identify itself to a webpage as:
Mozilla/5.0 (Windows NT 5.1; rv:27.0) Gecko/20100101 Firefox/27.0 SeaMonkey/2.24
# The macro code of useragent.kmm from 1.5.4.
#
# K-Meleon Macros (http://kmeleon.sourceforge.net/wiki/index.php?id=MacroLanguage)
# ---------- User Agent --------------------------------------------------------------------------------------------
#
#
# Dependencies : main.kmm ($macroPrefBranch)
# Resources : -
# Preferences : kmeleon.privacy.useragent[1,2,...].name
# kmeleon.privacy.useragent[1,2,...].string
#
# ------------------------------------------------------------------------------------------------------------------
UserAgent{
macroinfo=_("Set the specified User Agent string");
menuchecked=$ARG==""?(getpref(STRING,$_UserAgent_Active)=="")getpref(STRING,$_UserAgent_Active)==getpref(STRING,$_UserAgent_Custom.$ARG.".string"));
$ARG==""?delpref($_UserAgent_Active):$_string=getpref(STRING,$_UserAgent_Custom.$ARG.".string");
$ARG==""?&_UserAgent_SyncMenu:&_UserAgent;
}
UserAgent_Custom{
macroinfo=_("Set a custom User Agent string");
$_string=prompt(_("Enter the User Agent string to identify K-Meleon as:"),_("Custom User Agent"),getpref(STRING,$_UserAgent_Active));
$_string==""?0:&_UserAgent;
}
UserAgent_AlertString{
macroinfo=_("View the current User Agent string");
injectJS("alert('"._("Current User Agent String:")."\\n\\n'+navigator.userAgent)");
}
UserAgent_ToggleReset{
macroinfo=_("Toggle resetting the default User Agent string when exiting");
menuchecked=getpref(BOOL,$_UserAgent_Reset);
togglepref(BOOL,$_UserAgent_Reset);
}
# ----- PRIVATE
$_UserAgent_Active="general.useragent.override";
$_UserAgent_Custom="kmeleon.privacy.useragent";
$_UserAgent_Reset=$macroPrefBranch."useragent.reset_on_exit";
_UserAgent{
$_string==""?delpref($_UserAgent_Active):setpref(STRING,$_UserAgent_Active,$_string); &_UserAgent_SyncMenu;
}
_UserAgent_SyncMenu{
$_data=getpref(STRING,$_UserAgent_Active);
setcheck("macros(UserAgent_Custom)",($_data!=""));
$_j=1; while($_j>0) &_UserAgent_SyncMenuLoop;
}
_UserAgent_SyncMenuLoop{
$__data=getpref(STRING,$_UserAgent_Custom.$_j.".string");
$__data==$_data?setcheck("macros(UserAgent_Custom)",false):0;
$_j=$__data==""?0:$_j+1;
}
$OnStartup=$OnStartup."_UserAgent_SyncMenu;";
_UserAgent_BuildMenu{
# tools menu
$_u="&User Agent";
setmenu(PrivacySecurity,popup,$_u);
setmenu($_u,macro,"Default","UserAgent()");
$_i=1; while($_i>0) &_UserAgent_BuildMenuLoop;
setmenu($_u,macro,"&Custom...",UserAgent_Custom);
setmenu($_u,macro,"&Reset To Default On Exit",UserAgent_ToggleReset);
setmenu($_u,separator,"&Reset To Default On Exit");
}
_UserAgent_BuildMenuLoop{
$__data=getpref(STRING,$_UserAgent_Custom.$_i.".name");
$__data==""?0:setmenu($_u,macro,$__data,"UserAgent(".$_i.")");
$_i=$__data==""?0:$_i+1;
}
$OnInit=$OnInit."_UserAgent_BuildMenu;";
_UserAgent_Reset{
getpref(BOOL,$_UserAgent_Reset)?delpref($_UserAgent_Active):0;
}
$OnQuit=$OnQuit."_UserAgent_Reset;";
# ------------------------------------------------------------------------------------------------------------------
$macroModules=$macroModules."UserAgent;";