Skip to content

Commit

Permalink
Small fixes | Pequenas correções
Browse files Browse the repository at this point in the history
Removed console logging and changed the default language.

PT

O recurso de registro no console foi removido e idioma padrão alterado.
  • Loading branch information
mauromascarenhas committed Jan 27, 2017
1 parent f177684 commit dd660e2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 9 deletions.
4 changes: 2 additions & 2 deletions manifest.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"manifest_version": 2,
"name": "__MSG_extensionName__",
"version": "1.0",
"version": "1.1",

"default_locale": "en",
"default_locale": "en_GB",

"description": "__MSG_extensionDescription__",

Expand Down
7 changes: 0 additions & 7 deletions safeIt.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ function chooseSafe(requestDetails){

// Loads a new and safe URL if necessary
if (URL != urlTemp && canReload){
console.log("trocou :v");
return{
redirectUrl : urlTemp
};
Expand All @@ -65,7 +64,6 @@ function changeYandex(url){
var parameter = params.get("text");

var newURL = "https://www.google.com/search?q=" + parameter + "&safe=active&gws_rd=cr";
console.log("New URL : " + newURL);
return newURL;
}

Expand All @@ -74,21 +72,16 @@ function changeYandex(url){
*/

function safeIt(url, paramName, paramValue){
console.log("Seems to be working, isn't it? Look at the url : " + url);

let params = new URL(url).searchParams;
var parameter = params.get(paramName);

console.log("SS parameter : " + parameter);

if (parameter === null){
url += ('&' + paramName + "=" + paramValue);
console.log("New URL : " + url);
}

else if (parameter != paramValue){
url = replaceUrlParam(url, paramName, paramValue);
console.log("New URL : " + url);
}

return url;
Expand Down

0 comments on commit dd660e2

Please sign in to comment.