Skip to content
This repository was archived by the owner on Sep 9, 2022. It is now read-only.

Commit fa2338d

Browse files
committed
minor changes, scripts to create packages to stores
1 parent a4b76eb commit fa2338d

File tree

5 files changed

+36
-21
lines changed

5 files changed

+36
-21
lines changed

js/popup.js

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -42,25 +42,7 @@ var formatNumber = function(count) {
4242
if ( typeof count !== 'number' ) {
4343
return '';
4444
}
45-
var s = count.toFixed(0);
46-
if ( count >= 1000 ) {
47-
if ( count < 10000 ) {
48-
s = s.slice(0,1) + '.' + s.slice(1,3) + 'K';
49-
} else if ( count < 100000 ) {
50-
s = s.slice(0,2) + '.' + s.slice(2,3) + 'K';
51-
} else if ( count < 1000000 ) {
52-
s = s.slice(0,3) + 'K';
53-
} else if ( count < 10000000 ) {
54-
s = s.slice(0,1) + '.' + s.slice(1,3) + 'M';
55-
} else if ( count < 100000000 ) {
56-
s = s.slice(0,2) + '.' + s.slice(2,3) + 'M';
57-
} else if ( count < 1000000000 ) {
58-
s = s.slice(0,3) + 'M';
59-
} else {
60-
s = s.slice(0,-9) + 'G';
61-
}
62-
}
63-
return s;
45+
return count.toLocaleString();
6446
};
6547

6648
/******************************************************************************/

make-opera-package.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#!/bin/bash
2+
#
3+
# This script assumes a linux environment
4+
5+
echo "*** uBlock: Creating Opera web store package"
6+
./make-package.sh
7+
rm -r dist/ublock/_locales/ru
8+
rm -r dist/ublock/_locales/zh_CN
9+
echo "*** uBlock: Opera package done."

make-package.sh

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#!/bin/bash
2+
#
3+
# This script assumes a linux environment
4+
5+
echo "*** uBlock: Creating web store package"
6+
echo "*** uBlock: Copying files"
7+
cp -R assets dist/ublock/
8+
rm dist/ublock/assets/*.sh
9+
cp -R css dist/ublock/
10+
cp -R img dist/ublock/
11+
cp -R js dist/ublock/
12+
cp -R lib dist/ublock/
13+
cp -R _locales dist/ublock/
14+
cp *.html dist/ublock/
15+
cp *.txt dist/ublock/
16+
cp manifest.json dist/ublock/
17+
echo "*** uBlock: Package done."
18+

manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"manifest_version": 2,
33
"name": "__MSG_extName__",
44
"short_name": "µBlock",
5-
"version": "0.1.4.0",
5+
"version": "0.1.4.2",
66
"description": "__MSG_extShortDesc__",
77
"icons": {
88
"16": "img/icon_16.png",

stats.html

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@
2424
padding: 2px 0;
2525
font-size: 14px;
2626
min-width: 20em;
27+
max-width: 40em;
28+
}
29+
select option {
30+
max-width: 40em;
2731
}
2832
#requests {
2933
margin: 2em 0 0 0;
@@ -35,7 +39,6 @@
3539
#requests table {
3640
margin: 1em 0;
3741
border: 0;
38-
font: 12px mono;
3942
border-collapse: collapse;
4043
min-width: 600px;
4144
}
@@ -56,6 +59,9 @@
5659
color: #aaa;
5760
cursor: pointer;
5861
}
62+
tr.requestEntry {
63+
font: 12px monospace;
64+
}
5965
tr.requestEntry td:nth-of-type(1) {
6066
border: 0;
6167
background-color: white;

0 commit comments

Comments
 (0)