1
0
Fork 0
mirror of https://github.com/kkapsner/CanvasBlocker synced 2025-07-04 20:46:39 +02:00

Moved i18n to extension module

This commit is contained in:
kkapsner 2019-04-09 08:29:52 +02:00
parent d89bfe4cb0
commit bab7d1496f
17 changed files with 101 additions and 85 deletions

View file

@ -7,8 +7,8 @@ const util = require("util");
function getMessagesInContent(content){
const foundMessages = [];
[
/\b(?:_|browser.i18n.getMessage|notify)\(["']([^"']+)["']\s*(?:\)|,)/g,
/\b(?:messageId|name)\s*:\s*["']([^"']+)["']/g,
/\b(?:_|browser.i18n.getMessage|notify|extension)\(["']([^"']+)["']\s*(?:\)|,)/g,
/\b(?:messageId|name|getTranslation)\s*:\s*["']([^"']+)["']/g,
].forEach(function(re){
let match;
while ((match = re.exec(content)) !== null){