diff --git a/Chrome extension/background.js b/Chrome extension/background.js index a0dc949..141fad7 100755 --- a/Chrome extension/background.js +++ b/Chrome extension/background.js @@ -12,15 +12,17 @@ $.get( "https://crypter.co.uk/version.php", function( data ) { actualVersion = data; }); -function preloadimages(arr){ - var newimages=[] - var arr=(typeof arr!="object")? [arr] : arr - for (var i=0; i= 0 && $(this).parent("span").parent("div").parent("div").html().indexOf("crypter") == -1){ var textarea = $(this).closest( ".fbNubFlyoutFooter" ).find("._5rpu"); textarea.addClass("textA"); - $(this).parent("span").after(''); + $(this).parent("span").after(''); } } }); @@ -240,7 +242,7 @@ function setDecryptButton(){ if(hasdecrypted == false){ //set black padlock for message - span.html(""); + span.html(''); } } } @@ -280,19 +282,19 @@ $( document ).on( 'keyup', '.textA', function(e){ && message.substring(0, tag.length) == tag && message.substring(message.length - tag.length, message.length) == tag){ //message is encrypted and formatted - if(crypter.attr("src") != "https://crypter.co.uk/icons/lock_encrypted.png"){ - crypter.attr("src","https://crypter.co.uk/icons/lock_encrypted.png"); + if(crypter.attr("src") != icon.lock_encrypted){ + crypter.attr("src", icon.lock_encrypted); } }else if($(this).parents(".fbNubFlyoutInner").find('.crypter').attr("fb_en") == 1 && message.length > 0 && getPass($(this))){ - crypter.attr("src","https://crypter.co.uk/icons/lock_encrypted.png"); + crypter.attr("src", icon.lock_encrypted); }else if(message.length > 0 && getPass($(this))){ - if(crypter.attr("src") != "https://crypter.co.uk/icons/lock_should.png"){ - crypter.attr("src","https://crypter.co.uk/icons/lock_should.png"); + if(crypter.attr("src") != icon.lock_should){ + crypter.attr("src", icon.lock_should); } }else{ //either no password has been set or there is no text in the text area - if(crypter.attr("src") != "https://crypter.co.uk/icons/lock_empty.png"){ - crypter.attr("src","https://crypter.co.uk/icons/lock_empty.png"); + if(crypter.attr("src") != icon.lock_empty){ + crypter.attr("src", icon.lock_empty); } } }); @@ -371,7 +373,7 @@ $( document ).on( 'click', '.crypter', function(){ var messageContent = bottomBit.find(".textA").text(); if(messageContent.length > 0){ if(getIndicesOf(tag, messageContent).length < 2){ - $(this).attr("src","https://crypter.co.uk/icons/lock_encrypted.png"); + $(this).attr("src", icon.lock_encrypted); //encrypt message var encrypt = tag+CryptoJS.AES.encrypt(messageContent, getPass($(this)))+tag; //replace text @@ -406,17 +408,17 @@ $( document ).on( 'click', '.crypter', function(){ //decrypt-lock hover animation $(document).on({ mouseenter: function () { - $(this).find("img").attr("src","https://crypter.co.uk/icons/lock_open.png"); + $(this).find("img").attr("src", icon.lock_open); }, mouseleave: function () { - $(this).find("img").attr("src","https://crypter.co.uk/icons/lock_should_black.png"); + $(this).find("img").attr("src", icon.lock_should_black); } }, ".decrypt"); //encrypt-lock hover fade (emulating facebook) $(document).on({ mouseenter: function () { - if($(this).attr("src") == "https://crypter.co.uk/icons/lock_empty.png"){ + if($(this).attr("src") == icon.lock_empty){ $(this).animate({opacity: 0.5}, 200); } }, @@ -510,4 +512,4 @@ document.addEventListener('keyup', function(evt){ evt.preventDefault(); return false; } -},true); +},true); \ No newline at end of file diff --git a/Chrome extension/images/lock_empty.png b/Chrome extension/images/lock_empty.png new file mode 100644 index 0000000..68d5fbe Binary files /dev/null and b/Chrome extension/images/lock_empty.png differ diff --git a/Chrome extension/images/lock_encrypted.png b/Chrome extension/images/lock_encrypted.png new file mode 100644 index 0000000..845f074 Binary files /dev/null and b/Chrome extension/images/lock_encrypted.png differ diff --git a/Chrome extension/images/lock_open.png b/Chrome extension/images/lock_open.png new file mode 100644 index 0000000..73b9d7b Binary files /dev/null and b/Chrome extension/images/lock_open.png differ diff --git a/Chrome extension/images/lock_should.png b/Chrome extension/images/lock_should.png new file mode 100644 index 0000000..1b0c7e2 Binary files /dev/null and b/Chrome extension/images/lock_should.png differ diff --git a/Chrome extension/images/lock_should_black.png b/Chrome extension/images/lock_should_black.png new file mode 100644 index 0000000..95602ce Binary files /dev/null and b/Chrome extension/images/lock_should_black.png differ diff --git a/Chrome extension/manifest.json b/Chrome extension/manifest.json index 87f69d5..0ecf27f 100644 --- a/Chrome extension/manifest.json +++ b/Chrome extension/manifest.json @@ -1,14 +1,16 @@ { "manifest_version": 2, - "name": "Facebook Chat Encrypter", "short_name": "Facebook Encrypter", "description": "A native encryption tool for Facebook messenger.", "version": "3.1.4.1115", - "icons": { "128": "logo.png" }, + "icons": { + "128": "logo.png" + }, "version_name": "1.092 beta", - "content_scripts": [ { - "js": [ "jquery.min.js", "aes.js", "blurbox.js", "background.js" ], - "matches": [ "https://www.facebook.com/*"] - }] + "content_scripts": [{ + "matches": ["*://www.facebook.com/*"], + "js": ["jquery.min.js", "aes.js", "blurbox.js", "background.js"] + }], + "web_accessible_resources": ["images/*.png"] } \ No newline at end of file