From c0d1c373fe7d9b4f1aff94748ac5d57acd1f7eaa Mon Sep 17 00:00:00 2001 From: zombieFox Date: Sun, 19 Apr 2020 16:15:59 +0100 Subject: [PATCH] [refactor] random names with random number of adjectives --- package-lock.json | 2 +- package.json | 2 +- src/js/helper.js | 2 +- src/js/link.js | 4 ++-- src/js/theme.js | 2 +- src/js/version.js | 2 +- src/manifest.json | 2 +- 7 files changed, 8 insertions(+), 8 deletions(-) diff --git a/package-lock.json b/package-lock.json index b4278e2c..e01ece8a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "nightTab", - "version": "5.11.0", + "version": "5.12.0", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index ff7c02b4..68ffa5b3 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "nightTab", - "version": "5.11.0", + "version": "5.12.0", "description": "A neutral new tab page accented with a chosen colour. Customise the layout, style, background and bookmarks in nightTab.", "main": "index.js", "scripts": { diff --git a/src/js/helper.js b/src/js/helper.js index 1dcadce8..28450dc3 100644 --- a/src/js/helper.js +++ b/src/js/helper.js @@ -774,6 +774,7 @@ var helper = (function() { toggleClass: toggleClass, addClass: addClass, removeClass: removeClass, + randomNumber: randomNumber, randomString: randomString, getClosest: getClosest, allEqual: allEqual, @@ -786,7 +787,6 @@ var helper = (function() { getObject: getObject, makeObject: makeObject, moveArrayItem: moveArrayItem, - randomNumber: randomNumber, toWords: toWords, ordinalWords: ordinalWords, ordinalNumber: ordinalNumber, diff --git a/src/js/link.js b/src/js/link.js index bfa1a4b7..62b2013e 100644 --- a/src/js/link.js +++ b/src/js/link.js @@ -647,7 +647,7 @@ var link = (function() { }, false); groupFormRandomNameButton.addEventListener("click", function(event) { var randomName = helper.randomString({ - adjectivesCount: 2 + adjectivesCount: helper.randomNumber(1, 3) }); stagedGroup.group.name.text = randomName; groupFormInputName.value = randomName; @@ -1193,7 +1193,7 @@ var link = (function() { }, false); groupNewRandomNameButton.addEventListener("click", function(event) { var randomName = helper.randomString({ - adjectivesCount: 2 + adjectivesCount: helper.randomNumber(1, 3) }); stagedLink.position.group.name.text = randomName; groupNewInput.value = randomName; diff --git a/src/js/theme.js b/src/js/theme.js index a97fd17c..5197f417 100644 --- a/src/js/theme.js +++ b/src/js/theme.js @@ -2079,7 +2079,7 @@ var theme = (function() { randomButton.addEventListener("click", function(event) { var randomName = helper.randomString({ - adjectivesCount: 2 + adjectivesCount: helper.randomNumber(1, 3) }); stagedThemeCustom.theme.name = randomName; nameInput.value = randomName; diff --git a/src/js/version.js b/src/js/version.js index 3077019c..45de8c13 100644 --- a/src/js/version.js +++ b/src/js/version.js @@ -1,6 +1,6 @@ var version = (function() { - var current = "5.11.0"; + var current = "5.12.0"; var name = "Zonked Tarsier"; diff --git a/src/manifest.json b/src/manifest.json index df94ecbe..2eccfd47 100644 --- a/src/manifest.json +++ b/src/manifest.json @@ -2,7 +2,7 @@ "name": "nightTab", "short_name": "nightTab", "description": "A neutral new tab page accented with a chosen colour. Customise the layout, style, background and bookmarks in nightTab.", - "version": "5.11.0", + "version": "5.12.0", "manifest_version": 2, "chrome_url_overrides": { "newtab": "index.html"