1
0
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:
Kushagra Gour
2017-07-04 02:47:49 +05:30
parent 95585c6274
commit ca1f255a34
12 changed files with 1100 additions and 593 deletions

View File

@@ -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/');