├── LICENSE ├── README.md ├── extension ├── .project ├── install.rdf ├── version.js └── xpi │ ├── chrome.manifest │ ├── chrome │ └── coscripter │ │ ├── content │ │ ├── contents.rdf │ │ ├── coscripter-browser-overlay.js │ │ ├── coscripter-browser-overlay.xul │ │ ├── coscripter-command-processor.js │ │ ├── coscripter-content-type-handler.js │ │ ├── coscripter-context.js │ │ ├── coscripter-data-extraction-mode.js │ │ ├── coscripter-dom-utils.js │ │ ├── coscripter-editor-richtextbox.js │ │ ├── coscripter-favicon.ico │ │ ├── coscripter-local-save.js │ │ ├── coscripter-release-notes.css │ │ ├── coscripter-release-notes.xhtml │ │ ├── coscripter-save-dialog.js │ │ ├── coscripter-save-dialog.xul │ │ ├── coscripter-scratch-space-browser-overlay.js │ │ ├── coscripter-scratch-space-browser-overlay.xul │ │ ├── coscripter-scratch-space-editor.js │ │ ├── coscripter-scratch-space-overlay.js │ │ ├── coscripter-scratch-space-overlay.xul │ │ ├── coscripter-scratch-space-sidebar.js │ │ ├── coscripter-scratch-space-window.js │ │ ├── coscripter-scratch-space-window.xul │ │ ├── coscripter-sidebar.js │ │ ├── coscripter-sidebar.xul │ │ ├── coscripter-statusbar.js │ │ ├── coscripter-testsidebar.js │ │ ├── coscripter-testsidebar.xul │ │ ├── coscripter-vegemite.js │ │ ├── coscripter-welcome-local.xhtml │ │ ├── coscripter-welcome.js │ │ ├── coscripter-welcome.xhtml │ │ ├── coscripterPrefs-server-dialog.js │ │ ├── coscripterPrefs-server-dialog.xul │ │ ├── coscripterPrefs-server-error.xul │ │ ├── coscripterPrefs.js │ │ ├── coscripterPrefs.xul │ │ ├── coscripter_version.js │ │ ├── interactor.html │ │ ├── nike │ │ │ └── et4a.js │ │ ├── related.js │ │ ├── related.xul │ │ └── sbRemoved.html │ │ ├── locale │ │ └── en-US │ │ │ ├── coscripter-browser-overlay.dtd │ │ │ ├── coscripter-save.dtd │ │ │ ├── coscripter-save.properties │ │ │ ├── coscripter-scratch-space.dtd │ │ │ ├── coscripter-server.dtd │ │ │ ├── coscripter-sidebar.dtd │ │ │ ├── coscripter-sidebar.properties │ │ │ ├── coscripter-welcome.dtd │ │ │ ├── coscripterPrefs.dtd │ │ │ ├── coscripterPrefsCopy.dtd │ │ │ └── related.dtd │ │ └── skin │ │ ├── coscripter-editor-richtextbox.css │ │ ├── coscripter-editor.css │ │ ├── coscripter-table.css │ │ ├── images │ │ ├── arrow-down.gif │ │ ├── arrow-right.gif │ │ ├── blank.png │ │ ├── bullet-selected.gif │ │ ├── bullet.gif │ │ ├── cancel.gif │ │ ├── comment.gif │ │ ├── copy-small.png │ │ ├── coscripter-logo-white-on-gray.gif │ │ ├── current-bullet-editing.gif │ │ ├── current-bullet-selected.gif │ │ ├── current-bullet.gif │ │ ├── current-editing.gif │ │ ├── current-selected.gif │ │ ├── current.gif │ │ ├── delete.png │ │ ├── edit.gif │ │ ├── empty.gif │ │ ├── executing.gif │ │ ├── feathers-button.gif │ │ ├── feathers-icon-1.gif │ │ ├── feathers-icon-2.gif │ │ ├── feathers-icon-3+.gif │ │ ├── feathers-icon-3.gif │ │ ├── feathers-icon-disabled.gif │ │ ├── feathers-icon.gif │ │ ├── hl.gif │ │ ├── info-left.png │ │ ├── info-middle.png │ │ ├── info-right.png │ │ ├── koala-little.gif │ │ ├── koala-over.gif │ │ ├── koala-pressed.gif │ │ ├── koala.gif │ │ ├── loading.gif │ │ ├── lock.gif │ │ ├── new.gif │ │ ├── open-in-sidebar.gif │ │ ├── open-local.gif │ │ ├── paste-small.png │ │ ├── people.png │ │ ├── person.png │ │ ├── private.gif │ │ ├── record-flashing copy.gif │ │ ├── record-flashing.gif │ │ ├── record-grey.gif │ │ ├── record-red.gif │ │ ├── run-in-sidebar.gif │ │ ├── run.gif │ │ ├── run_all_rows.gif │ │ ├── save-wiki.gif │ │ ├── save.gif │ │ ├── share.gif │ │ ├── sheet.gif │ │ ├── space.gif │ │ ├── step.gif │ │ ├── stop.gif │ │ ├── to-wiki.gif │ │ ├── unlock.gif │ │ └── vertical-gradient.png │ │ ├── sidebar.css │ │ └── welcome.css │ ├── components │ ├── coscripter-run-security-bypass-protocol.js │ ├── coscripter-security-bypass-protocol.js │ └── coscripter-uf-observer.js │ ├── defaults │ └── preferences │ │ └── coscripter.js │ ├── install.rdf │ └── modules │ ├── coscripter-preview.js │ └── coscripter-scratch-space.js ├── platform ├── .project ├── chrome.manifest ├── install.rdf └── modules │ ├── component-registry.js │ ├── coscripter-command-generator.js │ ├── coscripter-command.js │ ├── coscripter-compiler.js │ ├── coscripter-database.js │ ├── coscripter-exec-env.js │ ├── coscripter-execution-engine.js │ ├── coscripter-filter-password.js │ ├── coscripter-labeler.js │ ├── coscripter-previewer.js │ ├── coscripter-strict-parser.js │ └── coscripter-utils.js └── yule ├── .project ├── chrome.manifest ├── install.rdf └── modules └── yule.js /README.md: -------------------------------------------------------------------------------- 1 | CoScripter Extension 2 | ==================== 3 | 4 | CoScripter is a system for recording, automating, and sharing business processes performed in a web browser such as printing photos online, requesting a vacation hold for postal mail, or checking a bank account balance. CoScripter lets you make a recording as you perform a procedure, play it back later automatically, and share it with your friends. 5 | 6 | CoScripter consists of two software components, a browser extension that runs in the Firefox browser and a online wiki-style database that stores scripts for later execution. This repository contains the source code for the CoScripter browser extension for Firefox. Code for the server can be found [here](http://github.com/jeffnichols-ibm/coscripter-server). 7 | 8 | Contents 9 | -------- 10 | 11 | This respository contains three sub-extensions that together implement the full functionality of the CoScripter extension. 12 | 13 | * __YULE__ is the event recording infrastructure for CoScripter. It enables recording across multiple windows and tabs without requiring any work by the application developer, and was designed for easy extensibility. 14 | 15 | * __CoScripter Platform__ contains all of the non-UI modules of CoScripter, including the parser for the CoScripter language (ClearScript) and an execution engine for CoScripter events. Other systems that wish to automate the web browser can be built on top of the CoScripter platform with requiring the presence of the CoScripter UI. 16 | 17 | * __CoScripter Extension__ contains the UI for the CoScripter, including the sidebar that allows users to view and execute scripts. The extension can run separately, but works best when paired with the [Ruby on Rails-based server](http://github.com/jeffnichols-ibm/coscripter-server). 18 | 19 | License 20 | ------- 21 | 22 | The CoScripter source is provided as-is under the Mozilla Public License. This code has not been actively maintained since at least 2012 so your mileage my vary, though it is known to function in recent versions of Firefox (including version 23.0.1). 23 | -------------------------------------------------------------------------------- /extension/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | coscripter-extension-robustness 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /extension/install.rdf: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | coscripter@almaden.ibm.com 10 | 11 | 12 | 32 13 | 2.2.7 14 | CoScripter 15 | Capture, share, and automate business processes 16 | 17 | 18 | {ec8030f7-c20a-464f-9b0e-13a3a9e97384} 19 | 3.0 20 | 99.0.0.* 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /extension/version.js: -------------------------------------------------------------------------------- 1 | var coscripter_download_version = 2.27 2 | -------------------------------------------------------------------------------- /extension/xpi/chrome.manifest: -------------------------------------------------------------------------------- 1 | # 2 | # Chrome Manifest file (for Firefox 1.1+) 3 | # 4 | 5 | # WARNING: don't forget the '/' at the end of the paths or it won't work!! 6 | 7 | # NOTE: if you want to change the name of the extension, 8 | # I think you need to change the instances of "coscripter" in here to the new name, 9 | # as well as in the install.rdf file 10 | 11 | content coscripter chrome/coscripter/content/ 12 | content coscripter chrome/coscripter/content/ contentaccessible=yes 13 | 14 | overlay chrome://browser/content/browser.xul chrome://coscripter/content/coscripter-browser-overlay.xul 15 | overlay chrome://browser/content/browser.xul chrome://coscripter/content/coscripter-scratch-space-browser-overlay.xul 16 | 17 | resource coscripter modules/ 18 | 19 | locale coscripter en-US chrome/coscripter/locale/en-US/ 20 | skin coscripter classic/1.0 chrome/coscripter/skin/ 21 | 22 | 23 | component {faeaffb2-3ec0-4172-9863-3503f30ef543} components/coscripter-run-security-bypass-protocol.js 24 | contract @mozilla.org/network/protocol;1?name=coscriptrun {faeaffb2-3ec0-4172-9863-3503f30ef543} 25 | category profile-after-change CoScripterRun @mozilla.org/network/protocol;1?name=coscriptrun 26 | 27 | component {76c60d3b-786f-4b8e-bfe4-678d42132995} components/coscripter-security-bypass-protocol.js 28 | contract @mozilla.org/network/protocol;1?name=coscript {76c60d3b-786f-4b8e-bfe4-678d42132995} 29 | category profile-after-change CoScripter @mozilla.org/network/protocol;1?name=coscript 30 | -------------------------------------------------------------------------------- /extension/xpi/chrome/coscripter/content/contents.rdf: -------------------------------------------------------------------------------- 1 | 42 | 43 | 44 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 56 | chrome:displayName="coscripter" 57 | chrome:extension="true" 58 | chrome:description="CoScripter is a system for recording, automating, and sharing business processes performed in a web browser" 59 | chrome:settingsURL="chrome://coscripter/content/coscripterPrefs.xul" 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | chrome://coscripter/content/coscripter-browser-overlay.xul 69 | 70 | 71 | 72 | 73 | -------------------------------------------------------------------------------- /extension/xpi/chrome/coscripter/content/coscripter-browser-overlay.xul: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 77 | 78 | 79 | 81 | 82 | 83 | 10 | 12 | 13 | 14 | 15 | 16 |
17 | 18 |
19 |

20 | &visitPre; 21 | &coscripterWebsite; 22 |

23 |
24 | 25 |
26 |
27 | 28 |

&myLocalScripts;

29 |
30 | 31 | 32 | 33 | 34 | 91 | 92 | 93 | 94 | -------------------------------------------------------------------------------- /extension/xpi/chrome/coscripter/content/coscripter-welcome.js: -------------------------------------------------------------------------------- 1 | const CC = Components.classes, CI = Components.interfaces, CIS = CI.nsISupports 2 | var consoleService = CC['@mozilla.org/consoleservice;1'].getService(CI.nsIConsoleService) 3 | var promptService = CC['@mozilla.org/embedcomp/prompt-service;1'] 4 | .getService(CI.nsIPromptService) 5 | function debug(msg) { 6 | //return ; //comment out to turn on debugging 7 | consoleService.logStringMessage(msg) 8 | } 9 | 10 | function searchScripts(website, searchtext) { 11 | Components.utils.import("resource://coscripter-platform/component-registry.js"); 12 | var u = registry.utils(); 13 | var serverURL = u.getKoalescenceURL(); 14 | if (serverURL[serverURL.length - 1] != "/") serverURL += "/"; 15 | var t = encodeURIComponent(searchtext); 16 | var searchURL = serverURL + "browse/search?q=" + t; 17 | u.getCurrentContentBrowser(window).loadURI(searchURL); 18 | return false; 19 | } 20 | 21 | 22 | function loadLocalScript(uuid, runP){ 23 | //debug("loadLocalScript called with " + arguments[0].parentNode.previousSibling.textContent) 24 | //document.load("coscript:http://coscripter.almaden.ibm.com/coscripter/api/script/2438") 25 | Components.utils.import("resource://coscripter-platform/component-registry.js"); 26 | var u = registry.utils(); 27 | //u.getCurrentContentBrowser(window).loadURI("coscript:http://coscripter.almaden.ibm.com/coscripter/api/script/2438"); 28 | u.getCoScripterWindow(window).loadLocalProcedure(uuid, runP) 29 | return false; 30 | } 31 | 32 | function deleteLocalScript(uuid){ 33 | //debug("deleteLocalScript called with " + arguments[0].parentNode.previousSibling.textContent) 34 | Components.utils.import("resource://coscripter-platform/component-registry.js"); 35 | var u = registry.utils(); 36 | //u.getCurrentContentBrowser(window).loadURI("coscript:http://coscripter.almaden.ibm.com/coscripter/api/script/2438"); 37 | u.getCoScripterWindow(window).deleteLocalProcedure(uuid) 38 | return false; 39 | } 40 | 41 | // Local Save 42 | 43 | -------------------------------------------------------------------------------- /extension/xpi/chrome/coscripter/content/coscripter-welcome.xhtml: -------------------------------------------------------------------------------- 1 | 2 | %welcomeDTD;]> 4 | 5 | 6 | 7 | 8 | 10 | 12 | 13 | 14 | 15 | 16 | 20 | 21 | 22 |
23 | 24 |

&coscripter;

25 |
26 |

27 | &coscripterDescription; 28 |

29 |

30 | &visitPre; 31 | &coscripterWebsite; 32 | &visitPost; 33 |

34 | 35 |
36 | 37 | 38 |
39 | 40 |
41 | &loading;... 42 |
43 | 44 | 48 | 49 | 73 | 74 | 171 | 172 | 173 | 174 | -------------------------------------------------------------------------------- /extension/xpi/chrome/coscripter/content/coscripterPrefs-server-dialog.js: -------------------------------------------------------------------------------- 1 | /* 2 | This Program contains software licensed pursuant to the following: 3 | MOZILLA PUBLIC LICENSE 4 | Version 1.1 5 | The contents of this file are subject to the Mozilla Public License 6 | Version 1.1 (the "License"); you may not use this file except in 7 | compliance with the License. You may obtain a copy of the License at 8 | http://www.mozilla.org/MPL/ 9 | 10 | Software distributed under the License is distributed on an "AS IS" 11 | basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the 12 | License for the specific language governing rights and limitations 13 | under the License. 14 | The Original Code is IBM. 15 | The Initial Developer of the Original Code is IBM Corporation. 16 | Portions created by IBM Corporation are Copyright (C) 2007 17 | IBM Corporation. All Rights Reserved. 18 | Contributor(s): Greg Little, Allen Cypher (acypher@us.ibm.com), Tessa Lau, Clemens Drews, Jeffrey Nichols, Eser Kandogan, Jeffrey Wong, Gaston Cangiano. 19 | 20 | This Program also contains a code package known as developer.mozilla.org sample code that is licensed pursuant to the license listed below. 21 | developer.mozilla.org sample code 22 | The program known as developer.mozilla.org sample code is licensed under the terms below. Those terms are reproduced below for your reference. 23 | 24 | The MIT License 25 | Copyright (c) 2007 Mozilla 26 | Permission is hereby granted, free of charge, to any person obtaining a copy 27 | of this software and associated documentation files (the "Software"), to deal 28 | in the Software without restriction, including without limitation the rights 29 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 30 | copies of the Software, and to permit persons to whom the Software is 31 | furnished to do so, subject to the following conditions: 32 | The above copyright notice and this permission notice shall be included in 33 | all copies or substantial portions of the Software. 34 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 35 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 36 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 37 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 38 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 39 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 40 | THE SOFTWARE. 41 | */ 42 | 43 | function onLoad() { 44 | var params = window.arguments[0].inn; 45 | var name = document.getElementById('serverName'); 46 | var url = document.getElementById('serverURL'); 47 | name.value = params['name']; 48 | url.value = params['url']; 49 | } 50 | 51 | // Called once iff the user clicks OK 52 | function onOK() { 53 | // Return the changed arguments 54 | // If the user clicks cancel, window.arguments[0].out remains null 55 | // because this function is never called 56 | 57 | // First we validate the server 58 | var server = { name : 59 | document.getElementById('serverName').value, 60 | url : document.getElementById('serverURL').value }; 61 | server["api"] = server["url"] + "api/"; 62 | 63 | var pingurl = server["api"] + "ping"; 64 | var h = Components.classes["@mozilla.org/xmlextras/xmlhttprequest;1"].createInstance(); 65 | h.open("get", pingurl, false); 66 | try { 67 | 68 | h.send(null); 69 | if (h.status == 200) { 70 | var ret = h.responseText; 71 | var nativeJSON = Components.classes["@mozilla.org/dom/json;1"].createInstance(Components.interfaces.nsIJSON); 72 | var pingobj = nativeJSON.decode(ret); 73 | if (pingobj["coscripter-login-url"] !== "") { 74 | window.arguments[0].out = server; 75 | return true; 76 | } 77 | } 78 | 79 | } catch (e) { 80 | dump('Error pinging: ' + e + '\n\t' + e.toSource() + '\n'); 81 | } 82 | 83 | // Otherwise, there was an error 84 | window.openDialog("chrome://coscripter/content/coscripterPrefs-server-error.xul", 85 | "", "chrome, dialog, modal, resizable=yes", null).focus(); 86 | return false; 87 | } 88 | 89 | -------------------------------------------------------------------------------- /extension/xpi/chrome/coscripter/content/coscripterPrefs-server-dialog.xul: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 45 | 53 |