Skip to content

Instantly share code, notes, and snippets.

View Susko3's full-sized avatar

Susko3

  • Faculty of Electrical Engineering and Computing
  • Croatia
  • 07:56 (UTC +02:00)
  • Bluesky @susko3.bsky.social
View GitHub Profile
javascript:( function() { var ch = (window.location.host == "ch.nicovideo.jp"); if (window.location.host == "www.nicolog.jp" && window.location.pathname.startsWith("/user/")) { var videos = document.querySelectorAll("table a"); var limit = videos.length - 1; var i = -1; var delay = 500; function addButton(linkText, color, buttonLink, floatDirection, btnLocation) { var btn = document.createElement("a"); var textNode = document.createTextNode(linkText); btn.appendChild(textNode); btn.style.backgroundColor = color; btn.style.color = "black"; btn.style.padding = "7px 14px"; btn.style.border = "1px solid black"; btn.style.float = floatDirection; if (floatDirection == "right") { btn.style.float = "left"; btn.style.marginLeft = "10px"; } else { btn.style.marginTop = "17px"; } btn.href = buttonLink; btn.target = "_blank"; document.querySelector(btnLocation).appendChild(btn); } function checkVideos() { setTimeout(function() { i++; var videoId = videos[i].href.split("?")[0].split("/")[4]; var btnLocation = 'a[href="wat

Demo:

Spoiler warning

Spoiler text. Note that it's important to have a space after the summary tag. You should be able to write any markdown you want inside the <details> tag... just make sure you close <details> afterward.

console.log("I'm a code block!");