├── CRX_ID
├── screenshot.png
├── src
├── icons
│ ├── icon_128.png
│ ├── icon_144.png
│ ├── icon_16.png
│ ├── icon_192.png
│ ├── icon_24.png
│ ├── icon_256.png
│ ├── icon_32.png
│ ├── icon_36.png
│ ├── icon_48.png
│ ├── icon_512.png
│ ├── icon_64.png
│ ├── icon_78.png
│ ├── icon_96.png
│ └── icon_1024.png
├── assets
│ ├── COG_Logo.png
│ ├── battery.svg
│ ├── thermostat.svg
│ ├── Chromium.svg
│ ├── cpu.svg
│ ├── info.svg
│ ├── internet.svg
│ ├── plugin.svg
│ └── COG_Icon.svg
├── fonts
│ └── RobotoCondensed.woff
├── manifest.mobile.json
├── js
│ ├── spin.js
│ ├── background.js
│ ├── util.js
│ ├── main.js
│ └── jquery-3.6.0.slim.min.js
├── css
│ ├── scroll.css
│ └── cog.css
├── README.txt
├── manifest.json
├── _locales
│ └── en
│ │ └── messages.json
└── index.html
└── README.md
/CRX_ID:
--------------------------------------------------------------------------------
1 | lflagkjijammaaekkifdijeknolfeijc
2 |
--------------------------------------------------------------------------------
/screenshot.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Alex313031/cog-chromium/HEAD/screenshot.png
--------------------------------------------------------------------------------
/src/icons/icon_128.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Alex313031/cog-chromium/HEAD/src/icons/icon_128.png
--------------------------------------------------------------------------------
/src/icons/icon_144.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Alex313031/cog-chromium/HEAD/src/icons/icon_144.png
--------------------------------------------------------------------------------
/src/icons/icon_16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Alex313031/cog-chromium/HEAD/src/icons/icon_16.png
--------------------------------------------------------------------------------
/src/icons/icon_192.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Alex313031/cog-chromium/HEAD/src/icons/icon_192.png
--------------------------------------------------------------------------------
/src/icons/icon_24.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Alex313031/cog-chromium/HEAD/src/icons/icon_24.png
--------------------------------------------------------------------------------
/src/icons/icon_256.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Alex313031/cog-chromium/HEAD/src/icons/icon_256.png
--------------------------------------------------------------------------------
/src/icons/icon_32.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Alex313031/cog-chromium/HEAD/src/icons/icon_32.png
--------------------------------------------------------------------------------
/src/icons/icon_36.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Alex313031/cog-chromium/HEAD/src/icons/icon_36.png
--------------------------------------------------------------------------------
/src/icons/icon_48.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Alex313031/cog-chromium/HEAD/src/icons/icon_48.png
--------------------------------------------------------------------------------
/src/icons/icon_512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Alex313031/cog-chromium/HEAD/src/icons/icon_512.png
--------------------------------------------------------------------------------
/src/icons/icon_64.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Alex313031/cog-chromium/HEAD/src/icons/icon_64.png
--------------------------------------------------------------------------------
/src/icons/icon_78.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Alex313031/cog-chromium/HEAD/src/icons/icon_78.png
--------------------------------------------------------------------------------
/src/icons/icon_96.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Alex313031/cog-chromium/HEAD/src/icons/icon_96.png
--------------------------------------------------------------------------------
/src/assets/COG_Logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Alex313031/cog-chromium/HEAD/src/assets/COG_Logo.png
--------------------------------------------------------------------------------
/src/icons/icon_1024.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Alex313031/cog-chromium/HEAD/src/icons/icon_1024.png
--------------------------------------------------------------------------------
/src/fonts/RobotoCondensed.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Alex313031/cog-chromium/HEAD/src/fonts/RobotoCondensed.woff
--------------------------------------------------------------------------------
/src/manifest.mobile.json:
--------------------------------------------------------------------------------
1 | {
2 | "packageId": "com.github.alex313031.cog_chrome_app",
3 | "versionCode": "0.15.7"
4 | }
5 |
--------------------------------------------------------------------------------
/src/js/spin.js:
--------------------------------------------------------------------------------
1 | // thorium.svg spinner
2 |
3 | $( "img.spin" ).hover(function() {
4 | //alert($( this ).css( "transform" ));
5 | if ( $( this ).css( "transform" ) == 'none' ){
6 | $(this).css("transform","rotate(-360deg)");
7 | } else {
8 | $(this).css("transform","" );
9 | }
10 | });
11 |
--------------------------------------------------------------------------------
/src/assets/battery.svg:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/src/js/background.js:
--------------------------------------------------------------------------------
1 | chrome.app.runtime.onLaunched.addListener(function() {
2 | chrome.app.window.create(
3 | "index.html",
4 | {
5 | id: "appWindow",
6 | frame: {
7 | color: "#160722"
8 | },
9 | innerBounds: {
10 | width: 960,
11 | height: 580,
12 | minWidth: 320,
13 | minHeight: 466,
14 | }
15 | }
16 | );
17 | });
18 |
--------------------------------------------------------------------------------
/src/assets/thermostat.svg:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/src/assets/Chromium.svg:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/src/assets/cpu.svg:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/src/js/util.js:
--------------------------------------------------------------------------------
1 | function formatBytes(bytes) {
2 | if (bytes < 1024) return bytes + ' Bytes';
3 | else if (bytes < 1048576) return (bytes / 1024).toFixed(3) + ' KB';
4 | else if (bytes < 1073741824) return (bytes / 1048576).toFixed(3) + ' MB';
5 | else return (bytes / 1073741824).toFixed(3) + ' GB';
6 | }
7 |
8 | function formatSeconds(seconds) {
9 | if (seconds < 60) return seconds + ' s';
10 | else if (seconds < 3600) {
11 | var minutes = Math.floor(seconds / 60).toFixed(0);
12 | return '00:' + ((minutes > 9) ? minutes : '0' + minutes);
13 | } else {
14 | var hours = Math.floor(seconds / 3600).toFixed(0);
15 | var minutes = Math.floor((seconds - (hours * 3600)) / 60).toFixed(0);
16 | return hours + ':' + ((minutes > 9) ? minutes : '0' + minutes);
17 | }
18 | };
19 |
--------------------------------------------------------------------------------
/src/assets/info.svg:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/src/css/scroll.css:
--------------------------------------------------------------------------------
1 | ::-webkit-scrollbar {
2 | width: 9px;
3 | height: auto;
4 | background-color: transparent;
5 | }
6 | ::-webkit-scrollbar-track {
7 | width: auto;
8 | height: auto;
9 | background-color: auto;
10 | -webkit-border-radius: 3px;
11 | }
12 | ::-webkit-scrollbar-track-piece {
13 | width: auto;
14 | height: auto;
15 | background-color: auto;
16 | -webkit-border-radius: 3px;
17 | }
18 | ::-webkit-scrollbar-thumb {
19 | width: auto;
20 | height: auto;
21 | background-color: auto;
22 | -webkit-border-radius: 3px;
23 | border: 1px solid rgba(165,165,165,0.9);
24 | }
25 | ::-webkit-scrollbar-thumb:active {
26 | width: auto;
27 | height: auto;
28 | background-color: #24292f;
29 | -webkit-border-radius: 3px;
30 | border: 1px solid rgba(165,165,165,0.9);
31 | }
32 |
--------------------------------------------------------------------------------
/src/assets/internet.svg:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/src/README.txt:
--------------------------------------------------------------------------------
1 | ## Copyright (c) 2018 François Beaufort and (c) 2022 Alex313031.
2 |
3 | # Description
4 | COG is a simple Chrome App that showcases the chrome.system.* APIs.
5 | It is a fork of https://github.com/beaufortfrancois/cog-chrome-app. See Patches/Changes below.
6 |
7 | # Patches/Changes
8 | - "Chrome" changed to "Chromium".
9 | - Icon changed to new gear logo + more icon sizes.
10 | - Gear logo is now inside the app (click it to spin it!)
11 | - Manifest updated to V3 with some extra things like offline enabled = true and minimum chromium version = 88.
12 | - Colours updated/changed.
13 | - Spacing modified.
14 | - Themed Scrollbar added.
15 | - Memory section now shows Used, Free, and Total.
16 | - Better section descriptions.
17 | - Warnings if an API is not available.
18 |
19 | # Installation
20 | * Check `Developer Mode` in `chrome://extensions`
21 | * Drag and Drop the COG.crx file into the window.
22 | * Run it.
23 |
--------------------------------------------------------------------------------
/src/manifest.json:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2018 François Beaufort and (c) 2022 Alex313031. //
2 |
3 | {
4 | "manifest_version": 2,
5 | "name": "__MSG_appName__",
6 | "short_name": "__MSG_appShortName__",
7 | "author": "Alex313031",
8 | "description": "__MSG_appDescription__",
9 | "version": "0.15.8",
10 | "version_name": "0.15.8",
11 | "offline_enabled": true,
12 | "minimum_chrome_version": "68",
13 | "default_locale": "en",
14 | "icons": {
15 | "16": "icons/icon_16.png",
16 | "24": "icons/icon_24.png",
17 | "32": "icons/icon_32.png",
18 | "36": "icons/icon_36.png",
19 | "48": "icons/icon_48.png",
20 | "64": "icons/icon_64.png",
21 | "78": "icons/icon_78.png",
22 | "96": "icons/icon_96.png",
23 | "128": "icons/icon_128.png",
24 | "144": "icons/icon_144.png",
25 | "192": "icons/icon_192.png",
26 | "256": "icons/icon_256.png",
27 | "512": "icons/icon_512.png",
28 | "1024": "icons/icon_1024.png"
29 | },
30 | "app": {
31 | "background": {
32 | "scripts": ["js/background.js"]
33 | }
34 | },
35 | "permissions": [
36 | "storage",
37 | "system.cpu",
38 | "system.display",
39 | "system.memory",
40 | "system.network",
41 | "system.storage"
42 | ]
43 | }
44 |
--------------------------------------------------------------------------------
/src/assets/plugin.svg:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/src/_locales/en/messages.json:
--------------------------------------------------------------------------------
1 | {
2 | "appName": {
3 | "message": "COG - System Info Viewer"
4 | },
5 | "appShortName": {
6 | "message": "COG"
7 | },
8 | "appDescription": {
9 | "message": "Display useful hardware and network info."
10 | },
11 | "operatingSystemLabel": {
12 | "message": "Operating System:"
13 | },
14 | "platformLabel": {
15 | "message": "Platform:"
16 | },
17 | "chromiumVersionLabel": {
18 | "message": "Chromium Version:"
19 | },
20 | "cpuNameLabel": {
21 | "message": "CPU"
22 | },
23 | "cpuArchLabel": {
24 | "message": "Architecture"
25 | },
26 | "cpuFeaturesLabel": {
27 | "message": "Features:"
28 | },
29 | "cpuTemperaturesLabel": {
30 | "message": "Temperatures"
31 | },
32 | "cpuUsageLabel": {
33 | "message": "CPU % Usage"
34 | },
35 | "internalStorageUnitsLabel": {
36 | "message": "Internal Storage"
37 | },
38 | "externalStorageUnitsLabel": {
39 | "message": "External Storage"
40 | },
41 | "memoryCapacityLabel": {
42 | "message": "Memory Used / Free / Total"
43 | },
44 | "memoryUsageLabel": {
45 | "message": "Memory % Usage"
46 | },
47 | "internetStateLabel": {
48 | "message": "Connection State"
49 | },
50 | "localAdaptersLabel": {
51 | "message": "Network Info"
52 | },
53 | "onlineState": {
54 | "message": "Online"
55 | },
56 | "offlineState": {
57 | "message": "Offline"
58 | },
59 | "batteryStatusLabel": {
60 | "message": "Battery State"
61 | },
62 | "batteryTimeLabel": {
63 | "message": "Time"
64 | },
65 | "batteryLevelLabel": {
66 | "message": "Battery Level %"
67 | },
68 | "batteryChargingState": {
69 | "message": "Charging"
70 | },
71 | "batteryDischargingState": {
72 | "message": "Discharging"
73 | },
74 | "untilFullText": {
75 | "message": "ec. until full"
76 | },
77 | "leftText": {
78 | "message": " left"
79 | },
80 | "primaryDisplayLabel": {
81 | "message": "Primary Display:"
82 | },
83 | "otherDisplaysLabel": {
84 | "message": "Other Displays:"
85 | },
86 | "languageLabel": {
87 | "message": "Primary Language"
88 | },
89 | "acceptLanguagesLabel": {
90 | "message": "All Languages"
91 | },
92 | "pluginsListLabel": {
93 | "message": "Plugins:"
94 | },
95 | "copyrightLabel": {
96 | "message": "About:"
97 | }
98 | }
99 |
100 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | #
COG - System Info Viewer App for Chromium
2 |
3 | COG is a simple [Chrome App](https://developer.chrome.com/apps/about_apps) that showcases the [`chrome.system.*`](https://developer.chrome.com/extensions/declare_permissions#system.cpu) APIs. It is a fork of https://github.com/beaufortfrancois/cog-chrome-app. See Patches/Changes below.
4 | You can get it [here](https://chrome.google.com/webstore/detail/cog-system-info-viewer/bkapefioegaebnkbjpfbbemmmcholeii?pli=1&_ind=category%252Fextensions&_asi=1&source=5).
5 |
6 | 
7 |
8 | ## Patches & Changes
9 | - "Chrome" changed to "Chromium".
10 | - Icon changed to new gear logo + more icon sizes.
11 | - Memory section now shows Used, Free, and Total.
12 | - Gear logo is now inside the app (click it to spin it!)
13 | - Various other logos.
14 | - Manifest updated to V3 with some extra things like offline enabled = true and minimum chromium version = 88.
15 | - Colours updated/changed.
16 | - Chromium version and about section link to chromium.org and here, respectively.
17 | - Spacing modified.
18 | - Themed Scrollbar added.
19 | - About section
20 | - Better section descriptions.
21 | - Warnings if an API is not available.
22 |
23 | ## Installation
24 |
25 | * Check `Developer Mode` in `chrome://extensions`
26 | * Drag and Drop the COG.crx file into the window.
27 | * Run it.
28 |
29 | ## Running the development version
30 |
31 | ###
Desktop
32 |
33 | * Check `Developer Mode` in `chrome://extensions`
34 | * Click "Load unpacked extension..." in `chrome://extensions` and select the `src` folder in the `cog-chrome-app` repository.
35 | * Run it.
36 |
37 | ### Test mobile version
38 |
39 | ###
Android
40 |
41 | * Install the Chrome Apps on mobile [requirements](https://github.com/MobileChromeApps/mobile-chrome-apps/blob/master/docs/Installation.md).
42 | * Create your project with `cca create cog-mobile-chrome-app --link-to=path/to/cog-chromium/src/manifest.json`
43 | * Plug in your Android device.
44 | * Go to Settings->Developer Options and enable `USB debugging`.
45 | * Run it with `cca run android`
46 |
--------------------------------------------------------------------------------
/src/assets/COG_Icon.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
35 |
--------------------------------------------------------------------------------
/src/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
17 |
30 |
31 |
32 |
33 |

34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |

45 |
46 |
47 |
48 |
58 |
68 |
69 |
70 |
71 |
72 |
Speed Test
73 |

74 |
75 |
79 |
80 |
81 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |

94 |
95 |
96 |
97 |
107 |
117 |
118 |
119 |
120 |

121 |
122 |
123 |
124 |
125 |
126 |

127 |
128 |
129 |
130 |
131 |
132 |
133 |
134 |
135 |
136 |
137 |
138 |
--------------------------------------------------------------------------------
/src/css/cog.css:
--------------------------------------------------------------------------------
1 | @font-face {
2 | font-family: 'Roboto Condensed';
3 | font-style: normal;
4 | font-weight: 400;
5 | src: local('Roboto Condensed Regular'), local('RobotoCondensed-Regular'), url(../fonts/RobotoCondensed.woff) format('woff');
6 | }
7 | html {
8 | height: 100%;
9 | }
10 | body {
11 | background: linear-gradient(180deg, #160722 0%, #351254 100%) no-repeat #24292f;
12 | margin: 0px auto;
13 | font-size: 20px;
14 | font-family: 'Roboto Condensed';
15 | overflow-y: scroll;
16 | height: 100%;
17 | }
18 | .topbar {
19 | color: rgb(143, 230, 200, 1.0);
20 | text-align: center;
21 | text-transform: uppercase;
22 | font-size: 100%;
23 | text-shadow: 1px 1px 1px rgba(0, 0, 0, 1.0);
24 | line-height: 50px;
25 | height: 50px;
26 | padding: 2px 0px;
27 | max-width: 900px;
28 | margin: 0px auto;
29 | }
30 | .title {
31 | padding-right: 40px;
32 | }
33 | .logo {
34 | padding-top: 6px;
35 | padding-left: 8px;
36 | float: left;
37 | filter: drop-shadow(1px 1px 1px rgba(0, 0, 0, 1.0));
38 | }
39 | .cr {
40 | padding-top: 7px;
41 | padding-bottom: 8px;
42 | float: left;
43 | filter: drop-shadow(1px 1px 1px rgba(0, 0, 0, 1.0));
44 | }
45 | .spin {
46 | transition: all .8s;
47 | }
48 | .spin2 {
49 | transition: all .8s;
50 | }
51 | .icon {
52 | filter: drop-shadow(1px 1px 1px rgba(0, 0, 0, 1.0));
53 | float: bottom;
54 | margin-top: 4px;
55 | margin-bottom: -2px;
56 | }
57 | .icon2 {
58 | filter: drop-shadow(1px 1px 1px rgba(0, 0, 0, 1.0));
59 | float: bottom;
60 | margin-top: 4px;
61 | margin-bottom: 4px;
62 | }
63 | .wrapper {
64 | max-width: 900px;
65 | margin: auto auto;
66 | }
67 | .section:before,
68 | .section:after {
69 | content: '';
70 | clear: both;
71 | display: table;
72 | }
73 | .section2:before,
74 | .section2:after {
75 | content: '';
76 | clear: both;
77 | display: table;
78 | }
79 | .section3:before,
80 | .section3:after {
81 | content: '';
82 | clear: both;
83 | display: table;
84 | }
85 | .box {
86 | margin: auto 18px;
87 | }
88 | .box:first-child {
89 | border-bottom: 1px solid rgba(165,165,165,1.0);
90 | padding-top: 8px;
91 | }
92 | .box:last-child {
93 | padding-bottom: 8px;
94 | }
95 | .box2 {
96 | margin: auto 18px;
97 | }
98 | .box3 {
99 | margin: auto 18px;
100 | }
101 | .box2:first-child {
102 | padding-top: 8px;
103 | }
104 | .box3:first-child {
105 | padding-top: 8px;
106 | }
107 | .box2:last-child {
108 | padding-bottom: 8px;
109 | }
110 | .box3:last-child {
111 | padding-bottom: 8px;
112 | }
113 | .about:first-child {
114 | padding-bottom: 14px;
115 | }
116 | .section {
117 | border-bottom: 1px solid rgba(165,165,165,1.0);
118 | box-shadow: 0px 1px 0px rgba(0, 0, 0, 1.0);
119 | }
120 | .section2 {
121 | border-bottom: 1px solid rgba(165,165,165,1.0);
122 | box-shadow: 0px 1px 0px rgba(0, 0, 0, 1.0);
123 | }
124 | .section3 {
125 | border: 0;
126 | box-shadow: 0px 1px 0px rgba(0, 0, 0, 1.0);
127 | }
128 | @media screen and (min-width: 940px) {
129 | .title {
130 | padding-right: 32px;
131 | }
132 | .logo {
133 | padding-top: 6px;
134 | padding-left: 0px;
135 | float: left;
136 | filter: drop-shadow(1px 1px 1px rgba(0, 0, 0, 1.0));
137 | }
138 | .cr {
139 | padding-top: 15px;
140 | padding-bottom: 8px;
141 | float: left;
142 | filter: drop-shadow(1px 1px 1px rgba(0, 0, 0, 1.0));
143 | }
144 | .box {
145 | margin: auto auto;
146 | padding: 8px 0px;
147 | width: 50%;
148 | float: left;
149 | }
150 | .box:first-child {
151 | border: 0;
152 | padding-top: 8px;
153 | }
154 | .box:last-child {
155 | border: 0;
156 | padding-bottom: 8px;
157 | }
158 | .box2 {
159 | margin: auto auto;
160 | padding: 8px 0px;
161 | width: 50%;
162 | float: left;
163 | }
164 | .box3 {
165 | margin: auto auto;
166 | padding: 8px 0px;
167 | width: 50%;
168 | float: left;
169 | }
170 | .box2:first-child {
171 | border: 0;
172 | padding-top: 8px;
173 | }
174 | .box3:first-child {
175 | border: 0;
176 | padding-top: 8px;
177 | padding-bottom: 12px;
178 | }
179 | .box2:last-child {
180 | border: 0;
181 | padding-bottom: 8px;
182 | }
183 | .box3:last-child {
184 | border: 0;
185 | padding-bottom: 8px;
186 | }
187 | .about:first-child {
188 | padding-bottom: 8px;
189 | }
190 | .section {
191 | border-bottom: 1px solid rgba(165,165,165,1.0);
192 | box-shadow: 0px 1px 0px rgba(0, 0, 0, 1.0);
193 | }
194 | .section2 {
195 | border-bottom: 1px solid rgba(165,165,165,1.0);
196 | box-shadow: 0px 1px 0px rgba(0, 0, 0, 1.0);
197 | }
198 | .section3 {
199 | border: 0;
200 | box-shadow: 0px 1px 0px rgba(0, 0, 0, 1.0);
201 | }
202 | }
203 | label {
204 | margin-top: 8px;
205 | font-size: 90%;
206 | color: rgba(143, 230, 200, 1.0);
207 | text-shadow: 1px 1px 1px rgba(0, 0, 0, 1.0);
208 | }
209 | .info {
210 | color: #ffffff;
211 | font-size: 90%;
212 | text-shadow: 1px 1px 1px rgba(0, 0, 0, 1.0);
213 | margin-top: 2px;
214 | margin-bottom: 8px;
215 | }
216 | .info2 {
217 | color: #ffffff;
218 | font-size: 90%;
219 | text-shadow: 1px 1px 1px rgba(0, 0, 0, 1.0);
220 | margin-top: 2px;
221 | margin-bottom: 2px;
222 | }
223 | .info3 {
224 | color: #ffffff;
225 | font-size: 90%;
226 | text-shadow: 1px 1px 1px rgba(0, 0, 0, 1.0);
227 | margin-top: 2px;
228 | margin-bottom: 8px;
229 | }
230 | .info:hover {
231 | color: rgba(250, 30, 78, 1.0);
232 | }
233 | .info2:hover {
234 | color: rgba(250, 30, 78, 1.0);
235 | }
236 | .info3:hover {
237 | color: rgba(250, 30, 78, 1.0);
238 | }
239 | .bar {
240 | height: 10px;
241 | margin-top: 5px;
242 | background: rgba(0, 0, 0, .6);
243 | overflow-x: hidden;
244 | }
245 | .bar-section {
246 | height: 100%;
247 | float: left;
248 | transition: transform .5s ease-in-out;
249 | }
250 | .dim {
251 | opacity: 1.0;
252 | width: 6px;
253 | text-align: center;
254 | display: inline-block;
255 | }
256 | .used {
257 | height: 10px;
258 | width: 100%;
259 | background: rgba(255, 255, 255, 1.0);
260 | box-shadow: inset -1px -1px 1px rgba(255, 255, 255, .6);
261 | }
262 | .usedcpu {
263 | height: 10px;
264 | width: 100%;
265 | background: rgba(195, 255, 112, 1.0);
266 | box-shadow: inset -1px -1px 1px rgba(255, 255, 255, .6);
267 | }
268 | .usedcpu:hover {
269 | height: 10px;
270 | width: 100%;
271 | background: rgba(255, 112, 112, 1.0);
272 | box-shadow: inset -1px -1px 1px rgba(255, 255, 255, .6);
273 | }
274 | .usedmem {
275 | height: 10px;
276 | width: 100%;
277 | background: rgba(14, 211, 223, 1.0);
278 | box-shadow: inset -1px -1px 1px rgba(255, 255, 255, .6);
279 | }
280 | .usedmem:hover {
281 | height: 10px;
282 | width: 100%;
283 | background: rgba(255, 112, 112, 1.0);
284 | box-shadow: inset -1px -1px 1px rgba(255, 255, 255, .6);
285 | }
286 | .usedbat {
287 | height: 9px;
288 | width: 100%;
289 | background: rgba(230, 230, 230, 1.0);
290 | box-shadow: inset -1px -1px 1px rgba(0, 0, 0, .6);
291 | }
292 | .usedbat:hover {
293 | height: 9px;
294 | width: 100%;
295 | background: rgba(255, 112, 112, 1.0);
296 | box-shadow: inset -1px -1px 1px rgba(0, 0, 0, .6);
297 | }
298 | .small {
299 | font-size: 90%;
300 | }
301 | .small2 {
302 | font-size: 90%;
303 | }
304 | .small3 {
305 | font-size: 75%;
306 | }
307 | #local-adapters {
308 | white-space: wrap;
309 | }
310 | .hidden {
311 | display: none;
312 | }
313 |
--------------------------------------------------------------------------------
/src/js/main.js:
--------------------------------------------------------------------------------
1 | var timeoutId;
2 | var previousCpuInfo;
3 |
4 | function initLabels() {
5 |
6 | function setLabel(elementId, messageId) {
7 | var label = document.querySelector('label[for=' + elementId + ']');
8 | label.textContent = chrome.i18n.getMessage(messageId);
9 | }
10 |
11 | setLabel('operating-system', 'operatingSystemLabel');
12 | setLabel('platform', 'platformLabel');
13 | setLabel('chromium-version', 'chromiumVersionLabel');
14 |
15 | setLabel('cpu-name', 'cpuNameLabel');
16 | setLabel('cpu-arch', 'cpuArchLabel');
17 | setLabel('cpu-features', 'cpuFeaturesLabel');
18 | setLabel('cpu-usage', 'cpuUsageLabel');
19 | setLabel('cpu-temperatures', 'cpuTemperaturesLabel');
20 |
21 | setLabel('internal-storage-units', 'internalStorageUnitsLabel');
22 | setLabel('external-storage-units', 'externalStorageUnitsLabel');
23 |
24 | setLabel('memory-capacity', 'memoryCapacityLabel');
25 | setLabel('memory-usage', 'memoryUsageLabel');
26 |
27 | setLabel('internet-state', 'internetStateLabel');
28 | setLabel('local-adapters', 'localAdaptersLabel');
29 |
30 | setLabel('battery-status', 'batteryStatusLabel');
31 | setLabel('battery-time', 'batteryTimeLabel');
32 | setLabel('battery-level', 'batteryLevelLabel');
33 |
34 | setLabel('primary-display', 'primaryDisplayLabel');
35 | setLabel('other-displays', 'otherDisplaysLabel');
36 |
37 | setLabel('language', 'languageLabel');
38 | setLabel('accept-languages', 'acceptLanguagesLabel');
39 |
40 | setLabel('plugins-list', 'pluginsListLabel');
41 | setLabel('copyright-list', 'copyrightLabel');
42 | }
43 |
44 | function initInfo() {
45 | var operatingSystem = document.querySelector('#operating-system');
46 | if (/CrOS/.test(navigator.userAgent)) {
47 | operatingSystem.textContent = 'Chrome OS';
48 | } else if (/Mac/.test(navigator.platform)) {
49 | operatingSystem.textContent = 'Mac OS';
50 | } else if (/Win/.test(navigator.platform)) {
51 | operatingSystem.textContent = 'Windows';
52 | } else if (/Android/.test(navigator.userAgent)) {
53 | operatingSystem.textContent = 'Android';
54 | } else if (/Linux/.test(navigator.userAgent)) {
55 | operatingSystem.textContent = 'Linux';
56 | } else {
57 | operatingSystem.textContent = '-';
58 | }
59 |
60 | var chromiumVersion = document.querySelector('#chromium-version');
61 | chromiumVersion.textContent = "M" + navigator.userAgent.match('Chrome/([0-9]*\.[0-9]*\.[0-9]*\.[0-9]*)')[1];
62 |
63 | var platform = document.querySelector('#platform');
64 | platform.textContent = navigator.platform.replace(/_/g, '-');
65 |
66 | var language = document.querySelector('#language');
67 | language.textContent = navigator.language;
68 |
69 | var copyright = document.querySelector('#copyright-list');
70 | copyright.textContent = "Copyright (c) 2022 Alex313031";
71 |
72 | var acceptLanguages = document.querySelector('#accept-languages');
73 | chrome.i18n.getAcceptLanguages(function(languages) {
74 | acceptLanguages.textContent = languages.join(', ');
75 | });
76 | }
77 |
78 | function initBattery() {
79 | if (!navigator.getBattery) {
80 | alert("Battery API not available, you should upgrade Chromium.");
81 | }
82 | document.querySelector('#battery').classList.remove('hidden');
83 |
84 | navigator.getBattery().then(function(batteryManager) {
85 | updateBattery(batteryManager);
86 | function update(event) {
87 | updateBattery(event.target);
88 | }
89 |
90 | batteryManager.onchargingchange = update;
91 | batteryManager.ondischargingtimechange = update;
92 | batteryManager.onchargingtimechange = update;
93 | batteryManager.onlevelchange = update;
94 | });
95 | }
96 |
97 | function updateBattery(batteryManager) {
98 | var batteryStatus = document.querySelector('#battery-status');
99 | if (batteryManager.charging) {
100 | batteryStatus.textContent = chrome.i18n.getMessage('batteryChargingState');
101 | } else {
102 | batteryStatus.textContent = chrome.i18n.getMessage('batteryDischargingState');
103 | }
104 |
105 | var batteryTime = document.querySelector('#battery-time');
106 | if (batteryManager.charging) {
107 | batteryTime.textContent = (batteryManager.chargingTime !== Infinity) ?
108 | formatSeconds(batteryManager.chargingTime) +
109 | chrome.i18n.getMessage('untilFullText') : '-';
110 | } else {
111 | batteryTime.textContent = (batteryManager.dischargingTime !== Infinity) ?
112 | formatSeconds(batteryManager.dischargingTime) +
113 | chrome.i18n.getMessage('leftText') : '-';
114 | }
115 |
116 | var batteryLevel = document.querySelector('#battery-level');
117 | var batteryUsed = batteryManager.level.toFixed(2) * 100;
118 | batteryLevel.querySelector('.usedbat').style.width = batteryUsed + '%';
119 | }
120 |
121 | function initPlugins() {
122 | if (!navigator.plugins.length) {
123 | alert("No Chromium Plugins detected.");
124 | }
125 |
126 | document.querySelector('#plugins').classList.remove('hidden');
127 |
128 | var pluginList = document.querySelector('#plugins-list');
129 | for (var i = 0; i < navigator.plugins.length; i++) {
130 | pluginList.innerHTML += '
' + navigator.plugins[i].name + '
';
131 | }
132 | }
133 |
134 | function updateStorage() {
135 | chrome.system.storage.getInfo(function(storageInfo) {
136 | if (storageInfo.length === 0) {
137 | document.querySelector('#storage').classList.add('hidden');
138 | return;
139 | }
140 |
141 | document.querySelector('#storage').classList.remove('hidden');
142 |
143 | var internalStorageUnits = document.querySelector('#internal-storage-units');
144 | var externalStorageUnits = document.querySelector('#external-storage-units');
145 | internalStorageUnits.innerHTML = '';
146 | externalStorageUnits.innerHTML = '';
147 | for (var i = 0; i < storageInfo.length; i++) {
148 | var storageUnitHtml = '
' + ' Total Size: ' + storageInfo[i].name +
149 | (storageInfo[i].capacity ? ' - ' + formatBytes(storageInfo[i].capacity) : '') + '
';
150 | if (storageInfo[i].type === 'removable') {
151 | externalStorageUnits.innerHTML += storageUnitHtml;
152 | } else {
153 | internalStorageUnits.innerHTML += storageUnitHtml;
154 | }
155 | }
156 |
157 | var internalStorage = document.querySelector('#internal-storage');
158 | if (internalStorageUnits.textContent === '') {
159 | internalStorage.classList.add('visible');
160 | } else {
161 | internalStorage.classList.remove('hidden');
162 | }
163 | var externalStorage = document.querySelector('#external-storage');
164 | if (externalStorageUnits.textContent === '') {
165 | externalStorage.classList.add('visible');
166 | } else {
167 | externalStorage.classList.remove('hidden');
168 | }
169 | });
170 | }
171 |
172 | function initCpu() {
173 | chrome.system.cpu.getInfo(function(cpuInfo) {
174 |
175 | var cpuName = cpuInfo.modelName.replace(/\(R\)/g, '®').replace(/\(TM\)/, '™');
176 | document.querySelector('#cpu-name').textContent = cpuName;
177 |
178 | var cpuArch = cpuInfo.archName.replace(/_/g, '-');
179 | var cpuArch2 = cpuInfo.archName.replace(/x86_/g, '');
180 | document.querySelector('#cpu-arch').textContent = cpuArch + ", " + cpuArch2 + " Bit CPU";
181 |
182 | var cpuFeatures = cpuInfo.features.join(', ').toUpperCase().replace(/_/g, '.') || '-';
183 | document.querySelector('#cpu-features').textContent = cpuFeatures;
184 |
185 | document.querySelector('#cpu-temperatures').textContent = 'N/A';
186 | if ('temperatures' in cpuInfo) {
187 | updateCpuTemperatures(cpuInfo);
188 | document.querySelector('#cpu-temperatures').addEventListener('click', function(event) {
189 | chrome.storage.sync.get('cpuTemperatureScale', function(result) {
190 | var cpuTemperatureScale = result.cpuTemperatureScale || 'Celsius';
191 | chrome.storage.sync.set({cpuTemperatureScale: (cpuTemperatureScale === 'Fahrenheit') ? 'Celsius' : 'Fahrenheit'});
192 | });
193 | });
194 | }
195 |
196 | var cpuUsage = document.querySelector('#cpu-usage');
197 | var width = parseInt(window.getComputedStyle(cpuUsage).width.replace(/px/g, ''));
198 | for (var i = 0; i < cpuInfo.numOfProcessors; i++) {
199 | var bar = document.createElement('div');
200 | bar.classList.add('bar');
201 | var usedSection = document.createElement('span');
202 | usedSection.classList.add('bar-section', 'usedcpu');
203 | usedSection.style.transform = 'translate(-' + width + 'px, 0px)';
204 | bar.appendChild(usedSection);
205 | cpuUsage.appendChild(bar);
206 | }
207 | });
208 | }
209 |
210 | function updateCpuUsage() {
211 | chrome.system.cpu.getInfo(function(cpuInfo) {
212 |
213 | if ('temperatures' in cpuInfo) {
214 | updateCpuTemperatures(cpuInfo);
215 | }
216 | if (!'temperatures' in cpuInfo) {
217 | alert("Not running on ChromiumOS.");
218 | }
219 |
220 | var cpuUsage = document.querySelector('#cpu-usage');
221 | var width = parseInt(window.getComputedStyle(cpuUsage).width.replace(/px/g, ''));
222 | for (var i = 0; i < cpuInfo.numOfProcessors; i++) {
223 | var usage = cpuInfo.processors[i].usage;
224 | var usedSectionWidth = 0;
225 | if (previousCpuInfo) {
226 | var oldUsage = previousCpuInfo.processors[i].usage;
227 | usedSectionWidth = Math.floor((usage.kernel + usage.user - oldUsage.kernel - oldUsage.user) / (usage.total - oldUsage.total) * 100);
228 | } else {
229 | usedSectionWidth = Math.floor((usage.kernel + usage.user) / usage.total * 100);
230 | }
231 | var bar = cpuUsage.querySelector('.bar:nth-child(' + (i + 1) + ')');
232 | bar.querySelector('.usedcpu').style.transform = 'translate(' + parseInt(usedSectionWidth * width / 100 - width) + 'px, 0px)';
233 | }
234 | previousCpuInfo = cpuInfo;
235 | });
236 | }
237 |
238 | function updateCpuTemperatures(cpuInfo) {
239 | chrome.storage.sync.get('cpuTemperatureScale', function(result) {
240 | if (result.cpuTemperatureScale === 'Fahrenheit') {
241 | document.querySelector('#cpu-temperatures').innerHTML = cpuInfo.temperatures.map(t => t + ' °C').join('
');
242 | } else {
243 | document.querySelector('#cpu-temperatures').innerHTML = cpuInfo.temperatures.map(t => Math.round(t * 1.8 + 32) + ' °F').join('
');
244 | }
245 | });
246 | }
247 |
248 | function initMemory() {
249 | chrome.system.memory.getInfo(function(memoryInfo) {
250 |
251 | document.querySelector('#memory-capacity').textContent = formatBytes(memoryInfo.capacity - memoryInfo.availableCapacity) + " / " + formatBytes(memoryInfo.availableCapacity) + " / Total: " + formatBytes(memoryInfo.capacity);
252 |
253 | var memoryUsage = document.querySelector('#memory-usage');
254 | var bar = document.createElement('div');
255 | bar.classList.add('bar');
256 | var usedSection = document.createElement('span');
257 | usedSection.classList.add('bar-section', 'usedmem');
258 | bar.appendChild(usedSection);
259 | memoryUsage.appendChild(bar);
260 | });
261 | }
262 |
263 | function updateMemoryUsage() {
264 | chrome.system.memory.getInfo(function(memoryInfo) {
265 |
266 | var memoryUsage = document.querySelector('#memory-usage');
267 | var usedMemory = 100 - Math.round(memoryInfo.availableCapacity / memoryInfo.capacity * 100);
268 | memoryUsage.querySelector('.usedmem').style.width = usedMemory + '%';
269 | });
270 | };
271 |
272 | function updateNetwork() {
273 | chrome.system.network.getNetworkInterfaces(function(networkInterfaces) {
274 |
275 | var internetState = document.querySelector('#internet-state');
276 | if (navigator.onLine) {
277 | internetState.textContent = chrome.i18n.getMessage('onlineState');
278 | } else {
279 | internetState.textContent = chrome.i18n.getMessage('offlineState');
280 | }
281 | if (navigator.connection && navigator.connection.type !== 'none') {
282 | internetState.textContent += ' - ' + navigator.connection.type;
283 | }
284 |
285 | var localAdapters = document.querySelector('#local-adapters');
286 | localAdapters.innerHTML = '';
287 | networkInterfaces.sort(function(a, b) {
288 | if (a.name < b.name) return -1;
289 | if (a.name > b.name) return 1;
290 | if (a.address.length < b.address.length) return -1;
291 | if (a.address.length > b.address.length) return 1;
292 | return 0;
293 | });
294 | for (var i = 0; i < networkInterfaces.length; i++) {
295 | localAdapters.innerHTML += '
' + networkInterfaces[i].name + ' - ' +
296 | networkInterfaces[i].address.toUpperCase().replace(/(:|\.)/g, '$1') + '
';
297 | }
298 | if (localAdapters.textContent === '') { localAdapters.textContent = '-' };
299 | });
300 | }
301 |
302 | function updateDisplays() {
303 | chrome.system.display.getInfo(function(displayInfo) {
304 |
305 | var primaryDisplay = document.querySelector('#primary-display');
306 | var otherDisplays = document.querySelector('#other-displays');
307 | primaryDisplay.innerHTML = '';
308 | otherDisplays.innerHTML = '';
309 | for (var i = 0; i < displayInfo.length; i++) {
310 | var name = (displayInfo[i].name) ? displayInfo[i].name + ' - ' : '';
311 | var refreshRate = (displayInfo[i].refreshRate) ? ' (' + displayInfo[i].refreshRate + ')' : '';
312 | var dpi = (displayInfo[i].dpiX) ? ' @ ' + parseInt(displayInfo[i].dpiX, 10) + 'dpi' : '';
313 | var display = '
' + name + displayInfo[i].bounds.width + 'x' +
314 | displayInfo[i].bounds.height + refreshRate + dpi + '
';
315 | if (displayInfo[i].isPrimary) {
316 | primaryDisplay.innerHTML += display;
317 | } else {
318 | otherDisplays.innerHTML += display;
319 | }
320 | }
321 | if (primaryDisplay.textContent === '') { primaryDisplay.textContent = '-' };
322 | if (otherDisplays.textContent === '') { otherDisplays.textContent = '-' };
323 | });
324 | }
325 |
326 | function updateAll() {
327 | updateCpuUsage();
328 | updateDisplays();
329 | updateMemoryUsage();
330 | updateNetwork();
331 | updateStorage();
332 |
333 | timeoutId = setTimeout(updateAll, 500);
334 | }
335 |
336 | chrome.runtime.onSuspend.addListener(function() {
337 | clearTimeout(timeoutId);
338 | });
339 |
340 | chrome.runtime.onSuspendCanceled.addListener(function() {
341 | updateAll();
342 | });
343 |
344 | document.addEventListener('DOMContentLoaded', function() {
345 | var topBar = document.querySelector('.title');
346 | topBar.innerHTML += ' ' + chrome.runtime.getManifest().version_name;
347 |
348 | initLabels();
349 |
350 | initInfo();
351 | initBattery();
352 | initCpu();
353 | initMemory();
354 | initPlugins();
355 | updateAll();
356 | });
357 |
--------------------------------------------------------------------------------
/src/js/jquery-3.6.0.slim.min.js:
--------------------------------------------------------------------------------
1 | /*! jQuery v3.6.0 -ajax,-ajax/jsonp,-ajax/load,-ajax/script,-ajax/var/location,-ajax/var/nonce,-ajax/var/rquery,-ajax/xhr,-manipulation/_evalUrl,-deprecated/ajax-event-alias,-effects,-effects/Tween,-effects/animatedSelector | (c) OpenJS Foundation and other contributors | jquery.org/license */
2 | !function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(g,e){"use strict";var t=[],r=Object.getPrototypeOf,s=t.slice,v=t.flat?function(e){return t.flat.call(e)}:function(e){return t.concat.apply([],e)},u=t.push,i=t.indexOf,n={},o=n.toString,y=n.hasOwnProperty,a=y.toString,l=a.call(Object),m={},b=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType&&"function"!=typeof e.item},x=function(e){return null!=e&&e===e.window},w=g.document,c={type:!0,src:!0,nonce:!0,noModule:!0};function C(e,t,n){var r,i,o=(n=n||w).createElement("script");if(o.text=e,t)for(r in c)(i=t[r]||t.getAttribute&&t.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function T(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?n[o.call(e)]||"object":typeof e}var f="3.6.0 -ajax,-ajax/jsonp,-ajax/load,-ajax/script,-ajax/var/location,-ajax/var/nonce,-ajax/var/rquery,-ajax/xhr,-manipulation/_evalUrl,-deprecated/ajax-event-alias,-effects,-effects/Tween,-effects/animatedSelector",E=function(e,t){return new E.fn.init(e,t)};function d(e){var t=!!e&&"length"in e&&e.length,n=T(e);return!b(e)&&!x(e)&&("array"===n||0===t||"number"==typeof t&&0
+~]|"+R+")"+R+"*"),U=new RegExp(R+"|>"),V=new RegExp(W),X=new RegExp("^"+B+"$"),Q={ID:new RegExp("^#("+B+")"),CLASS:new RegExp("^\\.("+B+")"),TAG:new RegExp("^("+B+"|[*])"),ATTR:new RegExp("^"+M),PSEUDO:new RegExp("^"+W),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+R+"*(even|odd|(([+-]|)(\\d*)n|)"+R+"*(?:([+-]|)"+R+"*(\\d+)|))"+R+"*\\)|)","i"),bool:new RegExp("^(?:"+I+")$","i"),needsContext:new RegExp("^"+R+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+R+"*((?:-\\d)?\\d*)"+R+"*\\)|)(?=[^-]|$)","i")},Y=/HTML$/i,G=/^(?:input|select|textarea|button)$/i,K=/^h\d$/i,J=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ee=/[+~]/,te=new RegExp("\\\\[\\da-fA-F]{1,6}"+R+"?|\\\\([^\\r\\n\\f])","g"),ne=function(e,t){var n="0x"+e.slice(1)-65536;return t||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},re=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ie=function(e,t){return t?"\0"===e?"\ufffd":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},oe=function(){C()},ae=xe(function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()},{dir:"parentNode",next:"legend"});try{O.apply(t=P.call(d.childNodes),d.childNodes),t[d.childNodes.length].nodeType}catch(e){O={apply:t.length?function(e,t){q.apply(e,P.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}function se(t,e,n,r){var i,o,a,s,u,l,c,f=e&&e.ownerDocument,d=e?e.nodeType:9;if(n=n||[],"string"!=typeof t||!t||1!==d&&9!==d&&11!==d)return n;if(!r&&(C(e),e=e||T,E)){if(11!==d&&(u=Z.exec(t)))if(i=u[1]){if(9===d){if(!(a=e.getElementById(i)))return n;if(a.id===i)return n.push(a),n}else if(f&&(a=f.getElementById(i))&&y(e,a)&&a.id===i)return n.push(a),n}else{if(u[2])return O.apply(n,e.getElementsByTagName(t)),n;if((i=u[3])&&p.getElementsByClassName&&e.getElementsByClassName)return O.apply(n,e.getElementsByClassName(i)),n}if(p.qsa&&!k[t+" "]&&(!v||!v.test(t))&&(1!==d||"object"!==e.nodeName.toLowerCase())){if(c=t,f=e,1===d&&(U.test(t)||_.test(t))){(f=ee.test(t)&&ye(e.parentNode)||e)===e&&p.scope||((s=e.getAttribute("id"))?s=s.replace(re,ie):e.setAttribute("id",s=A)),o=(l=h(t)).length;while(o--)l[o]=(s?"#"+s:":scope")+" "+be(l[o]);c=l.join(",")}try{return O.apply(n,f.querySelectorAll(c)),n}catch(e){k(t,!0)}finally{s===A&&e.removeAttribute("id")}}}return g(t.replace($,"$1"),e,n,r)}function ue(){var r=[];return function e(t,n){return r.push(t+" ")>x.cacheLength&&delete e[r.shift()],e[t+" "]=n}}function le(e){return e[A]=!0,e}function ce(e){var t=T.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function fe(e,t){var n=e.split("|"),r=n.length;while(r--)x.attrHandle[n[r]]=t}function de(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function pe(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function he(n){return function(e){var t=e.nodeName.toLowerCase();return("input"===t||"button"===t)&&e.type===n}}function ge(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&ae(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function ve(a){return le(function(o){return o=+o,le(function(e,t){var n,r=a([],e.length,o),i=r.length;while(i--)e[n=r[i]]&&(e[n]=!(t[n]=e[n]))})})}function ye(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}for(e in p=se.support={},i=se.isXML=function(e){var t=e&&e.namespaceURI,n=e&&(e.ownerDocument||e).documentElement;return!Y.test(t||n&&n.nodeName||"HTML")},C=se.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:d;return r!=T&&9===r.nodeType&&r.documentElement&&(a=(T=r).documentElement,E=!i(T),d!=T&&(n=T.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",oe,!1):n.attachEvent&&n.attachEvent("onunload",oe)),p.scope=ce(function(e){return a.appendChild(e).appendChild(T.createElement("div")),"undefined"!=typeof e.querySelectorAll&&!e.querySelectorAll(":scope fieldset div").length}),p.attributes=ce(function(e){return e.className="i",!e.getAttribute("className")}),p.getElementsByTagName=ce(function(e){return e.appendChild(T.createComment("")),!e.getElementsByTagName("*").length}),p.getElementsByClassName=J.test(T.getElementsByClassName),p.getById=ce(function(e){return a.appendChild(e).id=A,!T.getElementsByName||!T.getElementsByName(A).length}),p.getById?(x.filter.ID=function(e){var t=e.replace(te,ne);return function(e){return e.getAttribute("id")===t}},x.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n=t.getElementById(e);return n?[n]:[]}}):(x.filter.ID=function(e){var n=e.replace(te,ne);return function(e){var t="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return t&&t.value===n}},x.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];i=t.getElementsByName(e),r=0;while(o=i[r++])if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),x.find.TAG=p.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):p.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},x.find.CLASS=p.getElementsByClassName&&function(e,t){if("undefined"!=typeof t.getElementsByClassName&&E)return t.getElementsByClassName(e)},s=[],v=[],(p.qsa=J.test(T.querySelectorAll))&&(ce(function(e){var t;a.appendChild(e).innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&v.push("[*^$]="+R+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||v.push("\\["+R+"*(?:value|"+I+")"),e.querySelectorAll("[id~="+A+"-]").length||v.push("~="),(t=T.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||v.push("\\["+R+"*name"+R+"*="+R+"*(?:''|\"\")"),e.querySelectorAll(":checked").length||v.push(":checked"),e.querySelectorAll("a#"+A+"+*").length||v.push(".#.+[+~]"),e.querySelectorAll("\\\f"),v.push("[\\r\\n\\f]")}),ce(function(e){e.innerHTML="";var t=T.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&v.push("name"+R+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&v.push(":enabled",":disabled"),a.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&v.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),v.push(",.*:")})),(p.matchesSelector=J.test(c=a.matches||a.webkitMatchesSelector||a.mozMatchesSelector||a.oMatchesSelector||a.msMatchesSelector))&&ce(function(e){p.disconnectedMatch=c.call(e,"*"),c.call(e,"[s!='']:x"),s.push("!=",W)}),v=v.length&&new RegExp(v.join("|")),s=s.length&&new RegExp(s.join("|")),t=J.test(a.compareDocumentPosition),y=t||J.test(a.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},D=t?function(e,t){if(e===t)return l=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!p.sortDetached&&t.compareDocumentPosition(e)===n?e==T||e.ownerDocument==d&&y(d,e)?-1:t==T||t.ownerDocument==d&&y(d,t)?1:u?H(u,e)-H(u,t):0:4&n?-1:1)}:function(e,t){if(e===t)return l=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,a=[e],s=[t];if(!i||!o)return e==T?-1:t==T?1:i?-1:o?1:u?H(u,e)-H(u,t):0;if(i===o)return de(e,t);n=e;while(n=n.parentNode)a.unshift(n);n=t;while(n=n.parentNode)s.unshift(n);while(a[r]===s[r])r++;return r?de(a[r],s[r]):a[r]==d?-1:s[r]==d?1:0}),T},se.matches=function(e,t){return se(e,null,null,t)},se.matchesSelector=function(e,t){if(C(e),p.matchesSelector&&E&&!k[t+" "]&&(!s||!s.test(t))&&(!v||!v.test(t)))try{var n=c.call(e,t);if(n||p.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){k(t,!0)}return 0":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(te,ne),e[3]=(e[3]||e[4]||e[5]||"").replace(te,ne),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||se.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&se.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return Q.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&V.test(n)&&(t=h(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(te,ne).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=m[e+" "];return t||(t=new RegExp("(^|"+R+")"+e+"("+R+"|$)"))&&m(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(n,r,i){return function(e){var t=se.attr(e,n);return null==t?"!="===r:!r||(t+="","="===r?t===i:"!="===r?t!==i:"^="===r?i&&0===t.indexOf(i):"*="===r?i&&-1:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function D(e,n,r){return b(n)?E.grep(e,function(e,t){return!!n.call(e,t,e)!==r}):n.nodeType?E.grep(e,function(e){return e===n!==r}):"string"!=typeof n?E.grep(e,function(e){return-1)[^>]*|#([\w-]+))$/;(E.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||L,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:j.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof E?t[0]:t,E.merge(this,E.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:w,!0)),k.test(r[1])&&E.isPlainObject(t))for(r in t)b(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=w.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):b(e)?void 0!==n.ready?n.ready(e):e(E):E.makeArray(e,this)}).prototype=E.fn,L=E(w);var q=/^(?:parents|prev(?:Until|All))/,O={children:!0,contents:!0,next:!0,prev:!0};function P(e,t){while((e=e[t])&&1!==e.nodeType);return e}E.fn.extend({has:function(e){var t=E(e,this),n=t.length;return this.filter(function(){for(var e=0;e\x20\t\r\n\f]*)/i,pe=/^$|^module$|\/(?:java|ecma)script/i;le=w.createDocumentFragment().appendChild(w.createElement("div")),(ce=w.createElement("input")).setAttribute("type","radio"),ce.setAttribute("checked","checked"),ce.setAttribute("name","t"),le.appendChild(ce),m.checkClone=le.cloneNode(!0).cloneNode(!0).lastChild.checked,le.innerHTML="",m.noCloneChecked=!!le.cloneNode(!0).lastChild.defaultValue,le.innerHTML="",m.option=!!le.lastChild;var he={thead:[1,""],col:[2,""],tr:[2,""],td:[3,""],_default:[0,"",""]};function ge(e,t){var n;return n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&S(e,t)?E.merge([e],n):n}function ve(e,t){for(var n=0,r=e.length;n",""]);var ye=/<|?\w+;/;function me(e,t,n,r,i){for(var o,a,s,u,l,c,f=t.createDocumentFragment(),d=[],p=0,h=e.length;p\s*$/g;function ke(e,t){return S(e,"table")&&S(11!==t.nodeType?t:t.firstChild,"tr")&&E(e).children("tbody")[0]||e}function De(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function Le(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function je(e,t){var n,r,i,o,a,s;if(1===t.nodeType){if(Y.hasData(e)&&(s=Y.get(e).events))for(i in Y.remove(t,"handle events"),s)for(n=0,r=s[i].length;n",2===lt.childNodes.length),E.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(m.createHTMLDocument?((r=(t=w.implementation.createHTMLDocument("")).createElement("base")).href=w.location.href,t.head.appendChild(r)):t=w),o=!n&&[],(i=k.exec(e))?[t.createElement(i[1])]:(i=me([e],t,o),o&&o.length&&E(o).remove(),E.merge([],i.childNodes)));var r,i,o},E.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l=E.css(e,"position"),c=E(e),f={};"static"===l&&(e.style.position="relative"),s=c.offset(),o=E.css(e,"top"),u=E.css(e,"left"),("absolute"===l||"fixed"===l)&&-1<(o+u).indexOf("auto")?(a=(r=c.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),b(t)&&(t=t.call(e,n,E.extend({},s))),null!=t.top&&(f.top=t.top-s.top+a),null!=t.left&&(f.left=t.left-s.left+i),"using"in t?t.using.call(e,f):c.css(f)}},E.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){E.offset.setOffset(this,t,e)});var e,n,r=this[0];return r?r.getClientRects().length?(e=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===E.css(r,"position"))t=r.getBoundingClientRect();else{t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;while(e&&(e===n.body||e===n.documentElement)&&"static"===E.css(e,"position"))e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=E(e).offset()).top+=E.css(e,"borderTopWidth",!0),i.left+=E.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-E.css(r,"marginTop",!0),left:t.left-i.left-E.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent;while(e&&"static"===E.css(e,"position"))e=e.offsetParent;return e||re})}}),E.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,i){var o="pageYOffset"===i;E.fn[t]=function(e){return $(this,function(e,t,n){var r;if(x(e)?r=e:9===e.nodeType&&(r=e.defaultView),void 0===n)return r?r[i]:e[t];r?r.scrollTo(o?r.pageXOffset:n,o?n:r.pageYOffset):e[t]=n},t,e,arguments.length)}}),E.each(["top","left"],function(e,n){E.cssHooks[n]=Me(m.pixelPosition,function(e,t){if(t)return t=Be(e,n),Pe.test(t)?E(e).position()[n]+"px":t})}),E.each({Height:"height",Width:"width"},function(a,s){E.each({padding:"inner"+a,content:s,"":"outer"+a},function(r,o){E.fn[o]=function(e,t){var n=arguments.length&&(r||"boolean"!=typeof e),i=r||(!0===e||!0===t?"margin":"border");return $(this,function(e,t,n){var r;return x(e)?0===o.indexOf("outer")?e["inner"+a]:e.document.documentElement["client"+a]:9===e.nodeType?(r=e.documentElement,Math.max(e.body["scroll"+a],r["scroll"+a],e.body["offset"+a],r["offset"+a],r["client"+a])):void 0===n?E.css(e,t,i):E.style(e,t,n,i)},s,n?e:void 0,n)}})}),E.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),E.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,n){E.fn[n]=function(e,t){return 0