From 0726fa437cfbfbcd30534d4695b45e160aa260b8 Mon Sep 17 00:00:00 2001 From: "burke.davey" Date: Mon, 23 May 2011 20:17:34 +0000 Subject: [PATCH] --- .../firefox_sendtophone/chrome.manifest | 24 - .../chrome/content/ff-overlay.js | 199 ------- .../chrome/content/ff-overlay.xul | 83 --- .../chrome/content/options.xul | 34 -- .../chrome/content/overlay.js | 301 ---------- .../chrome/content/upload.css | 16 - .../chrome/content/upload.xml | 99 ---- .../chrome/content/uploads.js | 168 ------ .../chrome/content/uploads.xul | 18 - .../chrome/locale/cs/overlay.dtd | 24 - .../chrome/locale/cs/overlay.properties | 23 - .../chrome/locale/cs/uploads.dtd | 1 - .../chrome/locale/de/overlay.dtd | 24 - .../chrome/locale/de/overlay.properties | 23 - .../chrome/locale/de/uploads.dtd | 1 - .../chrome/locale/en-US/overlay.dtd | 24 - .../chrome/locale/en-US/overlay.properties | 23 - .../chrome/locale/en-US/uploads.dtd | 1 - .../chrome/locale/es/overlay.dtd | 24 - .../chrome/locale/es/overlay.properties | 23 - .../chrome/locale/es/uploads.dtd | 1 - .../chrome/locale/fr/overlay.dtd | 24 - .../chrome/locale/fr/overlay.properties | 23 - .../chrome/locale/fr/uploads.dtd | 1 - .../chrome/locale/ga-IE/overlay.dtd | 24 - .../chrome/locale/ga-IE/overlay.properties | 23 - .../chrome/locale/ga-IE/uploads.dtd | 1 - .../chrome/locale/hi-IN/overlay.dtd | 24 - .../chrome/locale/hi-IN/overlay.properties | 22 - .../chrome/locale/hi-IN/uploads.dtd | 1 - .../chrome/locale/hu/overlay.dtd | 24 - .../chrome/locale/hu/overlay.properties | 23 - .../chrome/locale/hu/uploads.dtd | 1 - .../chrome/locale/it/overlay.dtd | 24 - .../chrome/locale/it/overlay.properties | 22 - .../chrome/locale/it/uploads.dtd | 1 - .../chrome/locale/ja-JP/overlay.dtd | 24 - .../chrome/locale/ja-JP/overlay.properties | 23 - .../chrome/locale/ja-JP/uploads.dtd | 1 - .../chrome/locale/nl/overlay.dtd | 24 - .../chrome/locale/nl/overlay.properties | 23 - .../chrome/locale/nl/uploads.dtd | 1 - .../chrome/locale/pt-BR/overlay.dtd | 24 - .../chrome/locale/pt-BR/overlay.properties | 23 - .../chrome/locale/pt-BR/uploads.dtd | 1 - .../chrome/locale/ru/overlay.dtd | 24 - .../chrome/locale/ru/overlay.properties | 23 - .../chrome/locale/ru/uploads.dtd | 1 - .../chrome/locale/sr/overlay.dtd | 24 - .../chrome/locale/sr/overlay.properties | 23 - .../chrome/locale/sr/uploads.dtd | 1 - .../chrome/locale/sv/overlay.dtd | 24 - .../chrome/locale/sv/overlay.properties | 23 - .../chrome/locale/sv/uploads.dtd | 1 - .../chrome/locale/zh-CN/overlay.dtd | 24 - .../chrome/locale/zh-CN/overlay.properties | 23 - .../chrome/locale/zh-CN/uploads.dtd | 1 - .../firefox_sendtophone/chrome/skin/icon.png | Bin 2747 -> 0 bytes .../chrome/skin/overlay.css | 32 -- .../chrome/skin/toolbar-button.png | Bin 4039 -> 0 bytes .../chrome/skin/uploads.css | 63 --- .../defaults/preferences/prefs.js | 15 - third_party/firefox_sendtophone/install.rdf | 34 -- .../modules/protocolHandlers.js | 137 ----- .../modules/sendtophone.js | 522 ------------------ .../modules/uploadsManager.js | 278 ---------- third_party/operatophone/README | 28 - third_party/operatophone/config.xml | 22 - third_party/operatophone/constants.js | 30 - third_party/operatophone/icon_18x18.png | Bin 515 -> 0 bytes third_party/operatophone/icon_64x64.png | Bin 4680 -> 0 bytes .../operatophone/includes/operatophone.js | 80 --- third_party/operatophone/index.html | 103 ---- third_party/operatophone/o2p_help.html | 43 -- third_party/operatophone/popup.html | 105 ---- third_party/operatophone/send_logic.js | 41 -- 76 files changed, 3241 deletions(-) delete mode 100644 third_party/firefox_sendtophone/chrome.manifest delete mode 100644 third_party/firefox_sendtophone/chrome/content/ff-overlay.js delete mode 100644 third_party/firefox_sendtophone/chrome/content/ff-overlay.xul delete mode 100644 third_party/firefox_sendtophone/chrome/content/options.xul delete mode 100644 third_party/firefox_sendtophone/chrome/content/overlay.js delete mode 100644 third_party/firefox_sendtophone/chrome/content/upload.css delete mode 100644 third_party/firefox_sendtophone/chrome/content/upload.xml delete mode 100644 third_party/firefox_sendtophone/chrome/content/uploads.js delete mode 100644 third_party/firefox_sendtophone/chrome/content/uploads.xul delete mode 100644 third_party/firefox_sendtophone/chrome/locale/cs/overlay.dtd delete mode 100644 third_party/firefox_sendtophone/chrome/locale/cs/overlay.properties delete mode 100644 third_party/firefox_sendtophone/chrome/locale/cs/uploads.dtd delete mode 100644 third_party/firefox_sendtophone/chrome/locale/de/overlay.dtd delete mode 100644 third_party/firefox_sendtophone/chrome/locale/de/overlay.properties delete mode 100644 third_party/firefox_sendtophone/chrome/locale/de/uploads.dtd delete mode 100644 third_party/firefox_sendtophone/chrome/locale/en-US/overlay.dtd delete mode 100644 third_party/firefox_sendtophone/chrome/locale/en-US/overlay.properties delete mode 100644 third_party/firefox_sendtophone/chrome/locale/en-US/uploads.dtd delete mode 100644 third_party/firefox_sendtophone/chrome/locale/es/overlay.dtd delete mode 100644 third_party/firefox_sendtophone/chrome/locale/es/overlay.properties delete mode 100644 third_party/firefox_sendtophone/chrome/locale/es/uploads.dtd delete mode 100644 third_party/firefox_sendtophone/chrome/locale/fr/overlay.dtd delete mode 100644 third_party/firefox_sendtophone/chrome/locale/fr/overlay.properties delete mode 100644 third_party/firefox_sendtophone/chrome/locale/fr/uploads.dtd delete mode 100644 third_party/firefox_sendtophone/chrome/locale/ga-IE/overlay.dtd delete mode 100644 third_party/firefox_sendtophone/chrome/locale/ga-IE/overlay.properties delete mode 100644 third_party/firefox_sendtophone/chrome/locale/ga-IE/uploads.dtd delete mode 100644 third_party/firefox_sendtophone/chrome/locale/hi-IN/overlay.dtd delete mode 100644 third_party/firefox_sendtophone/chrome/locale/hi-IN/overlay.properties delete mode 100644 third_party/firefox_sendtophone/chrome/locale/hi-IN/uploads.dtd delete mode 100644 third_party/firefox_sendtophone/chrome/locale/hu/overlay.dtd delete mode 100644 third_party/firefox_sendtophone/chrome/locale/hu/overlay.properties delete mode 100644 third_party/firefox_sendtophone/chrome/locale/hu/uploads.dtd delete mode 100644 third_party/firefox_sendtophone/chrome/locale/it/overlay.dtd delete mode 100644 third_party/firefox_sendtophone/chrome/locale/it/overlay.properties delete mode 100644 third_party/firefox_sendtophone/chrome/locale/it/uploads.dtd delete mode 100644 third_party/firefox_sendtophone/chrome/locale/ja-JP/overlay.dtd delete mode 100644 third_party/firefox_sendtophone/chrome/locale/ja-JP/overlay.properties delete mode 100644 third_party/firefox_sendtophone/chrome/locale/ja-JP/uploads.dtd delete mode 100644 third_party/firefox_sendtophone/chrome/locale/nl/overlay.dtd delete mode 100644 third_party/firefox_sendtophone/chrome/locale/nl/overlay.properties delete mode 100644 third_party/firefox_sendtophone/chrome/locale/nl/uploads.dtd delete mode 100644 third_party/firefox_sendtophone/chrome/locale/pt-BR/overlay.dtd delete mode 100644 third_party/firefox_sendtophone/chrome/locale/pt-BR/overlay.properties delete mode 100644 third_party/firefox_sendtophone/chrome/locale/pt-BR/uploads.dtd delete mode 100644 third_party/firefox_sendtophone/chrome/locale/ru/overlay.dtd delete mode 100644 third_party/firefox_sendtophone/chrome/locale/ru/overlay.properties delete mode 100644 third_party/firefox_sendtophone/chrome/locale/ru/uploads.dtd delete mode 100644 third_party/firefox_sendtophone/chrome/locale/sr/overlay.dtd delete mode 100644 third_party/firefox_sendtophone/chrome/locale/sr/overlay.properties delete mode 100644 third_party/firefox_sendtophone/chrome/locale/sr/uploads.dtd delete mode 100644 third_party/firefox_sendtophone/chrome/locale/sv/overlay.dtd delete mode 100644 third_party/firefox_sendtophone/chrome/locale/sv/overlay.properties delete mode 100644 third_party/firefox_sendtophone/chrome/locale/sv/uploads.dtd delete mode 100644 third_party/firefox_sendtophone/chrome/locale/zh-CN/overlay.dtd delete mode 100644 third_party/firefox_sendtophone/chrome/locale/zh-CN/overlay.properties delete mode 100644 third_party/firefox_sendtophone/chrome/locale/zh-CN/uploads.dtd delete mode 100644 third_party/firefox_sendtophone/chrome/skin/icon.png delete mode 100644 third_party/firefox_sendtophone/chrome/skin/overlay.css delete mode 100644 third_party/firefox_sendtophone/chrome/skin/toolbar-button.png delete mode 100644 third_party/firefox_sendtophone/chrome/skin/uploads.css delete mode 100644 third_party/firefox_sendtophone/defaults/preferences/prefs.js delete mode 100644 third_party/firefox_sendtophone/install.rdf delete mode 100644 third_party/firefox_sendtophone/modules/protocolHandlers.js delete mode 100644 third_party/firefox_sendtophone/modules/sendtophone.js delete mode 100644 third_party/firefox_sendtophone/modules/uploadsManager.js delete mode 100644 third_party/operatophone/README delete mode 100644 third_party/operatophone/config.xml delete mode 100644 third_party/operatophone/constants.js delete mode 100644 third_party/operatophone/icon_18x18.png delete mode 100644 third_party/operatophone/icon_64x64.png delete mode 100644 third_party/operatophone/includes/operatophone.js delete mode 100644 third_party/operatophone/index.html delete mode 100644 third_party/operatophone/o2p_help.html delete mode 100644 third_party/operatophone/popup.html delete mode 100644 third_party/operatophone/send_logic.js diff --git a/third_party/firefox_sendtophone/chrome.manifest b/third_party/firefox_sendtophone/chrome.manifest deleted file mode 100644 index 2ce5ce8..0000000 --- a/third_party/firefox_sendtophone/chrome.manifest +++ /dev/null @@ -1,24 +0,0 @@ -content sendtophone chrome/content/ -skin sendtophone classic/1.0 chrome/skin/ -resource sendtophone modules/ - -locale sendtophone cs chrome/locale/cs/ -locale sendtophone de chrome/locale/de/ -locale sendtophone en-US chrome/locale/en-US/ -locale sendtophone es chrome/locale/es/ -locale sendtophone fr chrome/locale/fr/ -locale sendtophone ga-IE chrome/locale/ga-IE/ -locale sendtophone hi-IN chrome/locale/hi-IN/ -locale sendtophone hu chrome/locale/hu/ -locale sendtophone it chrome/locale/it/ -locale sendtophone ja-JP chrome/locale/ja-JP/ -locale sendtophone nl chrome/locale/nl/ -locale sendtophone pt-BR chrome/locale/pt-BR/ -locale sendtophone ru chrome/locale/ru/ -locale sendtophone sr chrome/locale/sr/ -locale sendtophone sv chrome/locale/sv/ -locale sendtophone zh-CN chrome/locale/zh-CN/ - -overlay chrome://browser/content/browser.xul chrome://sendtophone/content/ff-overlay.xul -style chrome://global/content/customizeToolbar.xul chrome://sendtophone/skin/overlay.css - diff --git a/third_party/firefox_sendtophone/chrome/content/ff-overlay.js b/third_party/firefox_sendtophone/chrome/content/ff-overlay.js deleted file mode 100644 index 935f328..0000000 --- a/third_party/firefox_sendtophone/chrome/content/ff-overlay.js +++ /dev/null @@ -1,199 +0,0 @@ -/* - Copyright 2010 Alfonso Martínez de Lizarrondo & Patrick O'Reilly - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -sendtophone.init = function() -{ - // Try to install the toolbar button, but only once - if (!this.prefs.getBoolPref("installedButton")) - { - this.installToolbarButton(); - this.prefs.setBoolPref( "installedButton", true ) ; - } - - document.getElementById("contentAreaContextMenu"). - addEventListener("popupshowing", function (e){ sendtophone.showFirefoxContextMenu(e); }, false); -} - -sendtophone.installToolbarButton = function() -{ - try { - var firefoxnav = document.getElementById("nav-bar"); - var curSet = firefoxnav.currentSet; - if (curSet.indexOf("sendtophone-toolbar-button") == -1) - { - var set; - // Place the button before the urlbar - if (curSet.indexOf("urlbar-container") != -1) - set = curSet.replace(/urlbar-container/, "urlbar-container,sendtophone-toolbar-button"); - else // at the end - set = curSet + ",sendtophone-toolbar-button"; - firefoxnav.setAttribute("currentset", set); - firefoxnav.currentSet = set; - document.persist("nav-bar", "currentset"); - // If you don't do the following call, funny things happen - try { - BrowserToolboxCustomizeDone(true); - } - catch (e) { } - } - } - catch(e) { } - -} - -//Toggle Protocol Prefrences onFlyout Menu Click -sendtophone.onToggleOption = function(menuitem) -{ - var option = menuitem.getAttribute("option"); - var checked = menuitem.getAttribute("checked") == "true"; - this.prefs.setBoolPref("protocols."+option, checked ); - if (!option.indexOf("sms")) - this.prefs.setBoolPref("protocols."+option+"to", checked ); -} - -//Set MenuItem as checked based on preferences. -sendtophone.onOptionsShowing= function(popup) - { - for (var child = popup.firstChild; child; child = child.nextSibling) - { - if (child.localName == "menuitem") - { - var option = child.getAttribute("option"); - if (option) - { - var checked = this.prefs.getBoolPref("protocols."+option); - child.setAttribute("checked", checked); - } - } - } - } - -sendtophone.showFirefoxContextMenu = function(event) { - // show or hide the menuitem based on what the context menu is on - // see http://kb.mozillazine.org/Adding_items_to_menus - var mediaURL = gContextMenu.mediaURL; - - gContextMenu.showItem("context-sendtophone-link", gContextMenu.onLink); - gContextMenu.showItem("context-sendtophone-image", false); - gContextMenu.showItem("context-sendtophone-qrimage", false); - gContextMenu.showItem("context-sendtophone-video", false); - if (gContextMenu.onImage) - { - var data = this.detectQR( mediaURL ); - if (data) - { - gContextMenu.showItem("context-sendtophone-qrimage", true); - var label = this.getString("qrContextMenu"); - label = label.replace("%s", data.substring(0, 20) + "..." ); - document.getElementById("context-sendtophone-qrimage").setAttribute("label", label); - } - else - gContextMenu.showItem("context-sendtophone-image", true); - } - /* TBC - if(mediaURL.match(/.webm$/i)){ - gContextMenu.showItem("context-sendtophone-video", true); - } - */ - - gContextMenu.showItem("context-sendtophone-text", gContextMenu.isTextSelected || - (gContextMenu.onTextInput && gContextMenu.target.selectionEnd > gContextMenu.target.selectionStart) ); - - gContextMenu.showItem("context-sendtophone-page", !( gContextMenu.inDirList || gContextMenu.isContentSelected || gContextMenu.onTextInput || gContextMenu.onLink || gContextMenu.onImage )); - -}; - - - - -// https://developer.mozilla.org/En/DragDrop/Drag_and_Drop -sendtophone.checkDrag = function(event) -{ - //event.dataTransfer.dropEffect = "copy"; - var types = event.dataTransfer.types; - if (types.contains("text/plain") || types.contains("text/uri-list") || types.contains("text/x-moz-url")) - event.preventDefault(); - - if (this.prefs.getCharPref( "fileServerUrl" ) && types.contains("application/x-moz-file") ) - event.preventDefault(); -} - -sendtophone.doDrop = function(event) -{ - var dt = event.dataTransfer; - var types = dt.types; - var supportedTypes = ["application/x-moz-file", "text/x-moz-url", "text/uri-list", "text/plain"]; - types = supportedTypes.filter(function (value) {return types.contains(value)}); - - event.preventDefault(); - switch (types[0]) - { - case "text/plain": - var plainText = dt.getData(types[0]); - sendtophoneCore.send("Selection", "http://google.com", plainText); - break; - - case "text/x-moz-url": - var mozUrlArray = dt.getData(types[1]).split("\n"); - var mozUrl = mozUrlArray[0]; - var mozTitle = mozUrlArray[1] || ''; - sendtophoneCore.send(mozTitle, mozUrl, ""); - break; - - case "text/uri-list": - var mozUrl = dt.getData(types[0]); - sendtophoneCore.send("", mozUrl, ""); - break; - - case "application/x-moz-file": - for (var i = 0; i < dt.mozItemCount; i++) - { - var file = dt.mozGetDataAt("application/x-moz-file", i); - if (file instanceof Ci.nsIFile ) - sendtophoneCore.sendFile(file); - else - this.alert(this.getString("InvalidFile")); - } - break; - } -} - -sendtophone.pickFile = function(folder) -{ - var fp = Cc["@mozilla.org/filepicker;1"] - .createInstance(Ci.nsIFilePicker); - - if (folder) - fp.init(window, this.getString("SendFolderToPhone"), Ci.nsIFilePicker.modeGetFolder); - else - { - fp.init(window, this.getString("SendFileToPhone"), Ci.nsIFilePicker.modeOpenMultiple); - fp.appendFilters(Ci.nsIFilePicker.filterAll | Ci.nsIFilePicker.filterImages); - } - - var rv = fp.show(); - - if (rv == Ci.nsIFilePicker.returnOK) - { - var files = fp.files; - while (files.hasMoreElements()) - { - var file = files.getNext().QueryInterface(Ci.nsILocalFile); - sendtophoneCore.sendFile( file ); - } - } - -} diff --git a/third_party/firefox_sendtophone/chrome/content/ff-overlay.xul b/third_party/firefox_sendtophone/chrome/content/ff-overlay.xul deleted file mode 100644 index b65174d..0000000 --- a/third_party/firefox_sendtophone/chrome/content/ff-overlay.xul +++ /dev/null @@ -1,83 +0,0 @@ - - - - - - - - - - - diff --git a/third_party/operatophone/o2p_help.html b/third_party/operatophone/o2p_help.html deleted file mode 100644 index 59febc3..0000000 --- a/third_party/operatophone/o2p_help.html +++ /dev/null @@ -1,43 +0,0 @@ - - - Opera to Phone - - - -

Opera to Phone Extension - Help

- -

Welcome to Opera to Phone.

- -

Introduction

- -

- This extension adds a button to Opera that allows users to send links from their Opera desktop browser to their Android device using Android's Cloud to Device Messaging service. -

-

- You need to install Chrome to Phone Android on your - phone for this extension to work. This application can be downloaded from Android Market (search for 'Chrome to Phone') or directly from the project downloads page. Requires a mobile - phone running Android 2.2 ("Froyo") or later. -

- -

Extension Features

- - - -

Requirements

- - - -

If you have any questions, comments or feedback, please visit the support page.

- - - diff --git a/third_party/operatophone/popup.html b/third_party/operatophone/popup.html deleted file mode 100644 index fcfcd73..0000000 --- a/third_party/operatophone/popup.html +++ /dev/null @@ -1,105 +0,0 @@ - - - - - - - - - - - - -
-
Sending to phone...
-

Help -

-
- - diff --git a/third_party/operatophone/send_logic.js b/third_party/operatophone/send_logic.js deleted file mode 100644 index 3c9b711..0000000 --- a/third_party/operatophone/send_logic.js +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Portions of this page are modifications based on work created and shared - * by Google and used according to terms described in the Creative Commons 3.0 - * Attribution License. - */ - -var channel; -var socket; -var req = new XMLHttpRequest(); - -function sendToPhone( data, listener ) { - req.open('POST', sendUrl, true); - req.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded'); - req.setRequestHeader('X-Same-Domain', 'true'); // XSRF protector - - req.onreadystatechange = function() { - if (this.readyState == 4) { - if (req.status == 200) { - var body = req.responseText; - if (body.indexOf('OK') == 0) { - listener(STATUS_SUCCESS); - } else if (body.indexOf('LOGIN_REQUIRED') == 0) { - listener(STATUS_LOGIN_REQUIRED); - } else if (body.indexOf('DEVICE_NOT_REGISTERED') == 0) { - listener(STATUS_DEVICE_NOT_REGISTERED); - } - } else { - listener(STATUS_GENERAL_ERROR); - } - } - }; - - var postData = ''; - for(var key in data) { - if(postData.length > 1) - postData += '&'; - if( data[key] !== null ) - postData += key + '=' + encodeURIComponent( data[key] ); - } - req.send(postData); -}