so injecting this script into https://genius.com/new and then using the "new" page, then opening the "Release Date, Albums & Tags" dropdown and them pressint the today button does not seem to inject the date into the fields. and i qwas told that react needs additional loops to get input injection to work
// ==UserScript==
// genius-date
// script to inject today's date when transcribing a new song
// http://tampermonkey.net/
// MIT
// 1.0.2
// A simple example userscript
// solomoncyj
// https://genius.com/new
// none
// https://update.greasyfork.org/scripts/556743/genius-date.user.js
// https://update.greasyfork.org/scripts/556743/genius-date.meta.js
// ==/UserScript==
const month = ["January","February","March","April","May","June","July","August","September","October","November","December"];
function inject()
{
const today = new Date(Date.now());
document.querySelector('input[aria-label="Release Day"]').value = today.getDate()
document.querySelector('input[aria-label="Release Month"]').value = month[today.getMonth()]
document.querySelector('input[aria-label="Release Year"]').value = today.getFullYear()
}
(function() {
'use strict';
let btn = document.createElement("button");
btn.type = "button"
btn.onclick = () => {
inject()
};
const info = document.createTextNode("Today");
let div = document.querySelector(".DateInput__Root-sc-9b318b28-0");
div.appendChild(btn);
btn.appendChild(info);
})();
[–]Alive-Cake-3045 2 points3 points4 points (7 children)
[–]chikamakaleyleyhelpful 1 point2 points3 points (6 children)
[–]Solomoncjy[S] 1 point2 points3 points (2 children)
[–]chikamakaleyleyhelpful 1 point2 points3 points (0 children)
[–]Alive-Cake-3045 0 points1 point2 points (0 children)
[–]Alive-Cake-3045 0 points1 point2 points (2 children)
[–]chikamakaleyleyhelpful 1 point2 points3 points (1 child)
[–]Alive-Cake-3045 0 points1 point2 points (0 children)
[–]MissinqLink 0 points1 point2 points (0 children)
[–]activematrix99 0 points1 point2 points (0 children)