[refactor] random names with random number of adjectives

This commit is contained in:
zombieFox 2020-04-19 16:15:59 +01:00
parent a7d65766be
commit c0d1c373fe
7 changed files with 8 additions and 8 deletions

2
package-lock.json generated
View File

@ -1,6 +1,6 @@
{ {
"name": "nightTab", "name": "nightTab",
"version": "5.11.0", "version": "5.12.0",
"lockfileVersion": 1, "lockfileVersion": 1,
"requires": true, "requires": true,
"dependencies": { "dependencies": {

View File

@ -1,6 +1,6 @@
{ {
"name": "nightTab", "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.", "description": "A neutral new tab page accented with a chosen colour. Customise the layout, style, background and bookmarks in nightTab.",
"main": "index.js", "main": "index.js",
"scripts": { "scripts": {

View File

@ -774,6 +774,7 @@ var helper = (function() {
toggleClass: toggleClass, toggleClass: toggleClass,
addClass: addClass, addClass: addClass,
removeClass: removeClass, removeClass: removeClass,
randomNumber: randomNumber,
randomString: randomString, randomString: randomString,
getClosest: getClosest, getClosest: getClosest,
allEqual: allEqual, allEqual: allEqual,
@ -786,7 +787,6 @@ var helper = (function() {
getObject: getObject, getObject: getObject,
makeObject: makeObject, makeObject: makeObject,
moveArrayItem: moveArrayItem, moveArrayItem: moveArrayItem,
randomNumber: randomNumber,
toWords: toWords, toWords: toWords,
ordinalWords: ordinalWords, ordinalWords: ordinalWords,
ordinalNumber: ordinalNumber, ordinalNumber: ordinalNumber,

View File

@ -647,7 +647,7 @@ var link = (function() {
}, false); }, false);
groupFormRandomNameButton.addEventListener("click", function(event) { groupFormRandomNameButton.addEventListener("click", function(event) {
var randomName = helper.randomString({ var randomName = helper.randomString({
adjectivesCount: 2 adjectivesCount: helper.randomNumber(1, 3)
}); });
stagedGroup.group.name.text = randomName; stagedGroup.group.name.text = randomName;
groupFormInputName.value = randomName; groupFormInputName.value = randomName;
@ -1193,7 +1193,7 @@ var link = (function() {
}, false); }, false);
groupNewRandomNameButton.addEventListener("click", function(event) { groupNewRandomNameButton.addEventListener("click", function(event) {
var randomName = helper.randomString({ var randomName = helper.randomString({
adjectivesCount: 2 adjectivesCount: helper.randomNumber(1, 3)
}); });
stagedLink.position.group.name.text = randomName; stagedLink.position.group.name.text = randomName;
groupNewInput.value = randomName; groupNewInput.value = randomName;

View File

@ -2079,7 +2079,7 @@ var theme = (function() {
randomButton.addEventListener("click", function(event) { randomButton.addEventListener("click", function(event) {
var randomName = helper.randomString({ var randomName = helper.randomString({
adjectivesCount: 2 adjectivesCount: helper.randomNumber(1, 3)
}); });
stagedThemeCustom.theme.name = randomName; stagedThemeCustom.theme.name = randomName;
nameInput.value = randomName; nameInput.value = randomName;

View File

@ -1,6 +1,6 @@
var version = (function() { var version = (function() {
var current = "5.11.0"; var current = "5.12.0";
var name = "Zonked Tarsier"; var name = "Zonked Tarsier";

View File

@ -2,7 +2,7 @@
"name": "nightTab", "name": "nightTab",
"short_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.", "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, "manifest_version": 2,
"chrome_url_overrides": { "chrome_url_overrides": {
"newtab": "index.html" "newtab": "index.html"