$('head > link[rel=icon]').attr('href','/api/pages/masui/壁紙/icon'); import '/api/code/shokai/音声入力Menu/script.js' var __title = $('').attr('href','/') //.text('🏠 ' + $('.project-home .title').text()) .text($('.project-home .title').text()) .css('color','#555') .css('font-size','20px') .hover( function () { $(this).css('text-decoration','none'); }) var __div = $('
') .append(__title) .css('margin-left','40px') .css('margin-top','12px') $('.navbar .container .row .col-brand').append(__div) const intervalPeriod = 10000 let isRunning = false let interval = undefined scrapbox.PageMenu.addMenu({ title: 'random-screen-saver', image: 'https://gyazo.com/c08a5e4439ded1540bc05b31da9d58c9/raw' }) scrapbox.PageMenu('random-screen-saver').addItem({ title: () => (isRunning)? "Stop screen saver." : "Start screen saver!", onClick: () => { if (isRunning) { isRunning = false clearInterval(interval) } else { isRunning = true clickRandomButton() interval = setInterval(clickRandomButton, intervalPeriod) } } }) function clickRandomButton() { const button = $('.random-jump-button') if (!button) return button[0].click() }