This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var tabs = require("tabs"); | |
| tabs.on("ready", function(tab) { | |
| console.log(tab.title); | |
| tab.attach({ | |
| contentScript: 'document.defaultView.postMessage("this is my message...", "*"); ' | |
| }); | |
| } | |
| ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const self = require("self"); | |
| var panelLogin = require("panel").Panel({ | |
| contentURL: self.data.url("login.html"), | |
| width: 800, | |
| height: 500, | |
| contentScript: "window.addEventListener('click', function(event) {" + | |
| "console.log('clicked');" + | |
| "}, false);", | |
| contentScriptWhen: "ready" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const widgets = require("widget"); | |
| const data = require("self").data; | |
| const panel = require("panel"); | |
| var panelScript = "on('message', function(message) {" + | |
| " console.log('receiving ' + message);" + | |
| " }); " | |
| var wid = widgets.Widget({ | |
| id: "some_menu", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var sanitize_name = function(s) { | |
| return s.replace(/[\s\.]*/g, '').toLowerCase(); | |
| } | |
| var os = Components.classes['@activestate.com/koOs;1']. | |
| getService(Components.interfaces.koIOs); | |
| var project_root = ko.filepicker.getFolder(os.getcwd(), "Choose a directory to create your new project in."); | |
| // var project_root = '/Users/jeff/code/moz/jetpack/tmp/two'; |
NewerOlder