[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",
"version": "5.11.0",
"version": "5.12.0",
"lockfileVersion": 1,
"requires": true,
"dependencies": {

View File

@ -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": {

View File

@ -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,

View File

@ -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;

View File

@ -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;

View File

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

View File

@ -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"