// prints and closes all tab URLs that are currently open in a firefox session // assumes you have MOZ REPL installed and working var l=window.length; for (i=0; i<l; i++) { repl.print(window.gURLBar.textValue) ; gBrowser.removeCurrentTab();}