-CLOSURE = closure-compiler --language_in ECMASCRIPT5
+CLOSURE = closure-compiler --language_in ECMASCRIPT_2020
+CLOSURE = cat
YUICOMPRESSOR = yuicompressor
all:
* @author arunjit@google.com (Arunjit Singh)
*/
-var CONSTANTS = {
+export const CONSTANTS = {
/**
* The available time ranges (in hours). -1 => eternity.
* @type {Array.<number>}
* @author arunjit@google.com (Arunjit Singh)
*/
+import {CONSTANTS} from './background.js';
+import {getUnitsForTime} from './util.js';
+
function getClearDate(s) {
var time = ~~(s.time) || CONSTANTS.DEFAULT_TIME;
if (time == -1)
* @author arunjit@google.com (Arunjit Singh)
*/
+import {CONSTANTS} from './background.js';
+import {getUnitsForTime} from './util.js';
+
window.addEventListener('load', init, false);
/**
* @param {number} time The time, in hours.
* @return {Object} The time and units of time (pluralized and localized).
*/
-function getUnitsForTime(time) {
+export function getUnitsForTime(time) {
var units = 'hour';
if (time >= 24) {
units = 'day';
javascript/clearhistory.js
javascript/options.js
javascript/util.js
+views/background.html
views/options.html
],
"background": {
"persistent": false,
- "scripts": [
- "javascript/background.js",
- "javascript/util.js",
- "javascript/clearhistory.js"
- ]
+ "page": "views/background.html"
},
"options_page": "views/options.html",
"browser_action": {
--- /dev/null
+<!DOCTYPE html>
+<html>
+ <head>
+ <meta charset='utf-8'/>
+ <script type='module' src='../javascript/clearhistory.js'></script>
+ </head>
+</html>
</div>
- <script src="../javascript/background.js"></script>
- <script src="../javascript/util.js"></script>
- <script src="../javascript/options.js"></script>
+ <script type="module" src="../javascript/options.js"></script>
</body>
</html>