MacroEditor

| resources: | Home Installation Screenshots Source Code Members Bugs |
|---|
I recommend WebLinks | MozEx | Preferential | QuickPrefs | TTLO | PNGCrush | 7-Zip
I used 7-Zip to edit files inside a *.jar, *.xpi, *.zip, *.tar, *.bzip, *.gzip etc. atleast 10% or more compression than WinZip
And thanks PNGCrush and Jed's bat file all my *.png files are PNGCrush-ed !!! I saved 20% or more space.
Exchange Macros
If you have created a Macro and wish to exchange with others enter it here.If you do not get a response to a question posted in this forum, please try sending a message to the project's mailing list or to the project owner directly.
- [1] Submitted by: Biju G. C. on Wednesday August 6th 2003
-
Following macro can be used to call Profile Manager in FireBird or ThunderBird
Macroname : Profile Manager
Script:var ww = Components.classes['@mozilla.org/embedcomp/window-watcher;1']
.getService(Components.interfaces.nsIWindowWatcher);
var params = Components.classes['@mozilla.org/embedcomp/dialogparam;1']
.createInstance(Components.interfaces.nsIDialogParamBlock);
params.SetNumberStrings(1);
params.SetString(0, "menu");
ww.openWindow(null,
"chrome://communicator/content/profile/profileSelection.xul",
null, "centerscreen,chrome,modal,titlebar", params); - [2] Submitted by: Jesse Ruderman on Wednesday August 6th 2003
-
// Mark All Links As Visited (MALAV) macro for Mozilla
// By Jesse Ruderman (April 2003, July 2003)// On sites that give you random links, this macro works
// great with the "hide visited" bookmarklet.function markLinksAsVisited(page)
{
var histClass = Components.classes["@mozilla.org/browser/global-history;1"];
var browserHistory = histClass.getService(Components.interfaces.nsIBrowserHistory);
var globalHistory = histClass.getService(Components.interfaces.nsIGlobalHistory);var URI = Components.classes['@mozilla.org/network/standard-url;1'].createInstance(Components.interfaces.nsIURI);
// We're about to dig into an untrusted document. But we have chrome privs!
// To be safer, we'll use String() and Number() whenever possible.
// The greatest danger is running a member function (could be replaced with eval)
// or manipulating a chrome object the page somehow had a reference to.var allLinks = page.links; // worst case: page gives us window.frames?
var numLinks = Number(allLinks.length);for (var i = 0; i < numLinks; ++i)
{
var L = allLinks[i]; // worst case: page gives us window.location, where setting href moves.
var u = String(L.href);URI.spec = u;
isSafe = URI.schemeIs("http") || URI.schemeIs("https");if (isSafe)
{
canonicalized = URI.spec;
if (! browserHistory.isVisited(canonicalized))
{
globalHistory.addPage(canonicalized);
browserHistory.setPageTitle(canonicalized, "MALAV " + canonicalized);// Update the link's visitedness.
// Use getAttribute to keep relative links relative (compare bug 187195)
var temp = L.getAttribute("href"); // worst case: L.getAttribute==eval.
L.href = "";
L.href = temp;
}
}
}
}markLinksAsVisited(document.getElementById("content").contentDocument);
- [3] Submitted by: Prabakar S on Tuesday August 19th 2003
-
// Go offline in Firebird - like in IE.
Components.classes['@mozilla.org/network/io-service;1'].getService(Components.interfaces.nsIIOService).offline=true
//You can also have another macro to come back online.
- [4] Submitted by: Alex on Sunday August 31st 2003
-
In the macro javascript "window" will give the "ChromeWindow" object, which is the firebird/Mozilla browser app window and "document" will give XULDocument object of the browser app. To access the currently viewing HTML document window we should use either "window._content" or currently focused frame window by "document.commandDispatcher.focusedWindow".
And the HTML document can be accessed by "window._content.document" or currently focused frame HTML document by "document.commandDispatcher.focusedWindow.document". Once you get HTML window or document objects other objects can be easly accessed in the same way we do in normal javascript.Following Macro is the demo of how to access objects of current HTML page.
function getBrowserWin(){ return window._content; } function getFocusedFrameWin(){ return document.commandDispatcher.focusedWindow } function getBrowserDoc(){ return window._content.document; } function getFocusedFrameDoc(){ return document.commandDispatcher.focusedWindow.document; } function getWinInfo(win){ var a=[]; a.push('Location : ' + win.location); a.push('Name : ' + win.name); var doc=win.document; if(doc) { a.push('Title : ' + doc.title ); a.push('Referrer : ' + doc.referrer); a.push('LastModified : ' + doc.lastModified); a.push('Cookies: ' +( doc.cookie?'\n=> '+doc.cookie.split(';').join('\n=> '):'none')); a.push('Links: ' + (doc.links.length?doc.links.length:'none')); a.push('Forms: ' + (doc.forms.length?doc.forms.length:'none')); a.push('Images: ' + (doc.images.length?doc.images.length:'none')); } a.push('Status : ' + win.status); a.push('Sub Frames : ' + (win.frames.length?win.frames.length:'none')); return a.join('\n'); } var mainwin = getBrowserWin(); var s; s=getWinInfo(mainwin); alert('WINDOW INFO\n\n'+s); var framewin = getFocusedFrameWin(); if(framewin && (framewin != mainwin)){ s=getWinInfo(framewin); alert('CURRENT FRAME INFO\n\n'+s); } - [5] Submitted by: Biju on Friday September 19th 2003
-
I am searching for a Mozilla MacroRecorder that allows to record user actions on a website - so that they can be played back as a unit-test.
- [6] Submitted by: PowerStat on Saturday September 20th 2003
-
Can someone know up a macro to insert the following either, in the headers or as the first line of every new news post:
X-No-Archive: YesThis'll be a nice stop gap until 0.3 comes out, which is supposed to contain a method for including this in the header.
Thanks
MikeD