mirror of
https://github.com/chinchang/web-maker.git
synced 2025-10-13 20:44:23 +02:00
prettify all src js files. Remove space rules from eslint
This commit is contained in:
@@ -5,30 +5,37 @@ function openApp() {
|
||||
});
|
||||
}
|
||||
|
||||
chrome.browserAction.onClicked.addListener(function(){
|
||||
chrome.browserAction.onClicked.addListener(function() {
|
||||
openApp();
|
||||
});
|
||||
|
||||
// Listen for tabs getting created.
|
||||
chrome.tabs.onCreated.addListener(function (tab) {
|
||||
chrome.tabs.onCreated.addListener(function(tab) {
|
||||
// If a new tab is opened (without any URL), check user's
|
||||
// replace Tab setting and act accordingly. Default is false.
|
||||
if (tab.url === 'chrome://newtab/') {
|
||||
chrome.storage.sync.get({
|
||||
replaceNewTab: false
|
||||
}, function(items) {
|
||||
if (items.replaceNewTab) {
|
||||
chrome.tabs.update(tab.id, {
|
||||
url: chrome.extension.getURL('index.html')
|
||||
}, function callback() {
|
||||
console.log('ho gaya');
|
||||
});
|
||||
chrome.storage.sync.get(
|
||||
{
|
||||
replaceNewTab: false
|
||||
},
|
||||
function(items) {
|
||||
if (items.replaceNewTab) {
|
||||
chrome.tabs.update(
|
||||
tab.id,
|
||||
{
|
||||
url: chrome.extension.getURL('index.html')
|
||||
},
|
||||
function callback() {
|
||||
console.log('ho gaya');
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
});
|
||||
);
|
||||
}
|
||||
});
|
||||
|
||||
chrome.runtime.onInstalled.addListener(function callback (details) {
|
||||
chrome.runtime.onInstalled.addListener(function callback(details) {
|
||||
if (details.reason === 'install') {
|
||||
openApp();
|
||||
}
|
||||
@@ -39,4 +46,4 @@ chrome.runtime.onInstalled.addListener(function callback (details) {
|
||||
}
|
||||
});
|
||||
|
||||
chrome.runtime.setUninstallURL('https://webmakerapp.com/uninstall/');
|
||||
chrome.runtime.setUninstallURL('https://webmakerapp.com/uninstall/');
|
||||
|
Reference in New Issue
Block a user