From 2990e938a6ebb182de4ff32ee1c3e04c2abc3a76 Mon Sep 17 00:00:00 2001 From: Jon Atkins Date: Tue, 14 May 2013 18:16:00 +0100 Subject: [PATCH] fixed indentation on speech-search plugin to match the others updated description to be clear it isn't for firefox --- plugins/speech-search.user.js | 60 +++++++++++++++++------------------ 1 file changed, 30 insertions(+), 30 deletions(-) diff --git a/plugins/speech-search.user.js b/plugins/speech-search.user.js index 3eeb8dbc..81d1e2bd 100644 --- a/plugins/speech-search.user.js +++ b/plugins/speech-search.user.js @@ -5,7 +5,7 @@ // @namespace https://github.com/jonatkins/ingress-intel-total-conversion // @updateURL @@UPDATEURL@@ // @downloadURL @@DOWNLOADURL@@ -// @description [@@BUILDNAME@@-@@BUILDDATE@@] Allow speech input for location search (webkit only for now) +// @description [@@BUILDNAME@@-@@BUILDDATE@@] Allow speech input for location search (webkit only for now - NOT Firefox) // @include https://www.ingress.com/intel* // @include http://www.ingress.com/intel* // @match https://www.ingress.com/intel* @@ -13,37 +13,37 @@ // ==/UserScript== function wrapper() { - // ensure plugin framework is there, even if iitc is not yet loaded - if (typeof window.plugin !== 'function') window.plugin = function() {}; - - // PLUGIN START //////////////////////////////////////////////////////// - - // use own namespace for plugin - window.plugin.speechSearch = function() {}; +// ensure plugin framework is there, even if iitc is not yet loaded +if (typeof window.plugin !== 'function') window.plugin = function() {}; - window.plugin.speechSearch.setup = function() { - // Give the search input the speech attribute - $("#geosearch").attr("x-webkit-speech", ""); - // Immediately search without further input - $("#geosearch").bind("webkitspeechchange", function() { - $("#geosearch").trigger($.Event("keypress", {keyCode: 13})); - }); - }; - - var setup = window.plugin.speechSearch.setup; - - // PLUGIN END ////////////////////////////////////////////////////////// - - if(window.iitcLoaded && typeof setup === 'function') { - setup(); - } else { - if(window.bootPlugins) - window.bootPlugins.push(setup); - else - window.bootPlugins = [setup]; - } + +// PLUGIN START //////////////////////////////////////////////////////// + +// use own namespace for plugin +window.plugin.speechSearch = function() {}; + +window.plugin.speechSearch.setup = function() { + // Give the search input the speech attribute + $("#geosearch").attr("x-webkit-speech", ""); + // Immediately search without further input + $("#geosearch").bind("webkitspeechchange", function() { + $("#geosearch").trigger($.Event("keypress", {keyCode: 13})); + }); +}; + +var setup = window.plugin.speechSearch.setup; + +// PLUGIN END ////////////////////////////////////////////////////////// + +if(window.iitcLoaded && typeof setup === 'function') { + setup(); +} else { + if(window.bootPlugins) + window.bootPlugins.push(setup); + else + window.bootPlugins = [setup]; +} } // wrapper end - // inject code into site context var script = document.createElement('script'); script.appendChild(document.createTextNode('('+ wrapper +')();'));