Пиши в этот топик все свои мысли и пожелания.
Флуд очень нежелателен.
Твой комментарий
// ==UserScript==
// @name Shikimori Auto Note
// @namespace http://tampermonkey.net/
// @version 0.5
// @description try to take over the world!
// @author nikola2222
// @match https://shikimori.me/*
// @match https://shikimori.one/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=shikimori.me
// @grant none
// ==/UserScript==
function createFormComment() {
'use strict';
let userRateForm = document.querySelector('div.b-user_rate:nth-child(2) > div:nth-child(1) > div:nth-child(1) > form:nth-child(1)');
if (userRateForm !== null) {
let commentButton = document.createElement('input');
commentButton.type = 'button';
commentButton.value = 'Добавить заметку';
commentButton.onclick = function() {
let text = document.createElement('div');
text.className = 'b-input text optional user_rate_text';
text.innerHTML = '<label class="text optional control-label" for="user_rate_text">Заметка</label><textarea class="text optional" name="user_rate[text]" id="user_rate_text"></textarea>';
// В кавычки ниже можно написать любой текст который будет автоматически вставлятся в поле.
text.lastChild.textContent = ``;
this.replaceWith(text);
}
userRateForm.append(commentButton);
}}
document.addEventListener("turbolinks:load", createFormComment);
createFormComment();
var func = function() { $('#custom_css').remove(); }; $(document).ready(func); $(document).on('page:load', func); $(document).on('turbolinks:load', func);
@ArthurChocolate@ISeeUtail, Пять сантиметров в секунду