Skip to content

Commit

Permalink
kas-elvirov#45 Moved into TypeScript
Browse files Browse the repository at this point in the history
  • Loading branch information
kas-elvirov committed Mar 24, 2019
1 parent 63f5b89 commit 97dd2fa
Show file tree
Hide file tree
Showing 13 changed files with 489 additions and 391 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ ___
# Browser extension GLOC ( [Chrome](https://chrome.google.com/webstore/detail/gloc-github-counter-lines/kaodcnpebhdbpaeeemkiobcokcnegdki?utm_source=chrome-ntp-icon), [Opera]() )
![Chrome](screens/browsers/chrome.png)
![Opera](screens/browsers/opera.png)
## **Current version: 7.6.17** ( 2018, 20 may )
## **Current version: 7.7.0** ( 2019, 24 march )
## **Initial release 2.0.1** ( 2017, 12 february )


Expand Down
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"short_name": "__MSG_shortName__",
"author": "__MSG_author__",
"description": "__MSG_description__",
"version": "7.6.17",
"version": "7.7.0",

"browser_action": {
"default_icon": "img/icon128.png",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "gloc",
"version": "7.6.17",
"version": "7.7.0",
"description": "Extension counts the number of lines of code in GitHub pages.",
"main": "index.js",
"scripts": {
Expand Down
10 changes: 0 additions & 10 deletions src/background.js

This file was deleted.

12 changes: 12 additions & 0 deletions src/background.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
chrome.runtime.onInstalled.addListener((details) => {
if (details.reason === 'install') {
chrome.runtime.openOptionsPage();
} else if (details.reason === 'update') {
const thisVersion = chrome.runtime.getManifest().version;
const newFeatures = '\n - small fixes \n - moved into TypeScript';
const statusMsg = `GitHub Gloc updated from ${details.previousVersion} to ${thisVersion}.
${newFeatures}`;

console.info(statusMsg);
}
});
30 changes: 30 additions & 0 deletions src/constants.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
export const APP_NAME = 'GitHub Gloc';
export const APP_CLASSNAME = 'github-gloc';
export const TRIES_DEFAULT = 5;
export const REPO_CLASS = 'repository-meta-content';

export const MESSAGE_IDS = {
POPUP: [
'addToken',
'github',
'shortName',
'indexWorksOnly',
'indexCountsFrom',
'indexProjectPage',
'indexUserPage',
'indexSearchPage',
'indexTrandingPage',
'indexEtc',
'attentionPlease',
'translateOurApp',
],
OPTIONS: [
'optionsTitle',
'github',
'shortName',
'optionsUlDescription',
'optionsAccess',
'optionsLimits',
'optionsCreateToken',
],
};
Loading

0 comments on commit 97dd2fa

Please sign in to comment.