// ==UserScript== // @name このユーザスクリプトはいかがでしたか // @version 1 // @grant none // ==/UserScript== (()=>{ if(document.body.textContent.indexOf("いかがでしたか") >= 0){ let style = document.createElement("style"); document.head.appendChild(style); style = style.sheet; style.insertRule(` @keyframes blink-red{ 0%{ background-color: #f00; color: #000; } 50%{ background-color: #fff; color: #f00; } } `); let a = document.createElement("div"); a.appendChild(document.createTextNode("このページには「いかがでしたか」が含まれています。")); a.style.position = "fixed"; a.style.zIndex = "9999999999"; a.style.width = "100%"; a.style.fontSize = "300%"; a.style.top = "0"; a.style.textAlign = "center"; a.style.animationName = "blink-red"; a.style.animationDuration = "2s"; a.style.animationTimingFunction = "steps(1, end)"; a.style.animationIterationCount = "infinite"; document.body.appendChild(a); } })();