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); -}