Fix inconsistent indentation and trailing whitespace
This commit is contained in:
parent
e272063c25
commit
481551e5fb
@ -166,21 +166,21 @@ function wordToByteArray(wordArray)
|
||||
// byte array to CryptoJS format
|
||||
function arrayToWordArray(u8Array)
|
||||
{
|
||||
var words = [], i = 0, len = u8Array.length;
|
||||
var words = [], i = 0, len = u8Array.length;
|
||||
|
||||
while (i < len) {
|
||||
words.push(
|
||||
(u8Array[i++] << 24) |
|
||||
(u8Array[i++] << 16) |
|
||||
(u8Array[i++] << 8) |
|
||||
(u8Array[i++])
|
||||
);
|
||||
}
|
||||
while (i < len) {
|
||||
words.push(
|
||||
(u8Array[i++] << 24) |
|
||||
(u8Array[i++] << 16) |
|
||||
(u8Array[i++] << 8) |
|
||||
(u8Array[i++])
|
||||
);
|
||||
}
|
||||
|
||||
return {
|
||||
sigBytes: len,
|
||||
words: words
|
||||
};
|
||||
return {
|
||||
sigBytes: len,
|
||||
words: words
|
||||
};
|
||||
}
|
||||
|
||||
const toHexString = bytes => bytes.reduce((str, byte) => str + byte.toString(16).padStart(2, '0'), '');
|
||||
@ -209,4 +209,4 @@ function PEM2Binary(pem)
|
||||
return bytes.buffer;
|
||||
}
|
||||
|
||||
}());
|
||||
}());
|
||||
|
@ -2,9 +2,9 @@ injectScripts();
|
||||
|
||||
async function injectScripts()
|
||||
{
|
||||
await injectScript('lib/pbf.3.0.5.min.js');
|
||||
await injectScript('lib/cryptojs-aes_0.2.0.min.js');
|
||||
await injectScript('protobuf-generated/license_protocol.proto.js');
|
||||
await injectScript('lib/pbf.3.0.5.min.js');
|
||||
await injectScript('lib/cryptojs-aes_0.2.0.min.js');
|
||||
await injectScript('protobuf-generated/license_protocol.proto.js');
|
||||
|
||||
|
||||
await injectScript('content_key_decryption.js');
|
||||
@ -13,14 +13,14 @@ async function injectScripts()
|
||||
|
||||
function injectScript(scriptName)
|
||||
{
|
||||
return new Promise(function(resolve, reject)
|
||||
{
|
||||
var s = document.createElement('script');
|
||||
s.src = chrome.extension.getURL(scriptName);
|
||||
s.onload = function() {
|
||||
this.parentNode.removeChild(this);
|
||||
resolve(true);
|
||||
};
|
||||
(document.head||document.documentElement).appendChild(s);
|
||||
});
|
||||
}
|
||||
return new Promise(function(resolve, reject)
|
||||
{
|
||||
var s = document.createElement('script');
|
||||
s.src = chrome.extension.getURL(scriptName);
|
||||
s.onload = function() {
|
||||
this.parentNode.removeChild(this);
|
||||
resolve(true);
|
||||
};
|
||||
(document.head||document.documentElement).appendChild(s);
|
||||
});
|
||||
}
|
||||
|
@ -2,28 +2,27 @@
|
||||
"manifest_version": 2,
|
||||
"name": "Widivine Decryptor",
|
||||
"short_name": "WidevineDecryptor",
|
||||
"description": "Decrypts and logs media keys from websites that use Widivine DRM",
|
||||
"description": "Decrypts and logs media keys from websites that use Widivine DRM",
|
||||
"version": "1.0.0",
|
||||
"permissions":
|
||||
"permissions":
|
||||
[
|
||||
|
||||
|
||||
],
|
||||
"icons":
|
||||
{
|
||||
|
||||
},
|
||||
"browser_action": {
|
||||
|
||||
},
|
||||
|
||||
"content_scripts":
|
||||
[
|
||||
{
|
||||
"matches": ["https://*/*"],
|
||||
"js": ["content_script.js"],
|
||||
"icons":
|
||||
{
|
||||
|
||||
},
|
||||
"browser_action": {
|
||||
|
||||
},
|
||||
"content_scripts":
|
||||
[
|
||||
{
|
||||
"matches": ["https://*/*"],
|
||||
"js": ["content_script.js"],
|
||||
"css": [],
|
||||
"run_at": "document_start"
|
||||
}
|
||||
],
|
||||
"web_accessible_resources": ["content_key_decryption.js", "eme_interception.js", "lib/*", "protobuf-generated/*"]
|
||||
}
|
||||
"run_at": "document_start"
|
||||
}
|
||||
],
|
||||
"web_accessible_resources": ["content_key_decryption.js", "eme_interception.js", "lib/*", "protobuf-generated/*"]
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user