Skip to content

Instantly share code, notes, and snippets.

@andy0130tw
Created December 16, 2023 02:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save andy0130tw/ff81d21fa29d74927b3ff2d6326ee3fe to your computer and use it in GitHub Desktop.
Save andy0130tw/ff81d21fa29d74927b3ff2d6326ee3fe to your computer and use it in GitHub Desktop.
Plurk detect hide_plurks_before
// ==UserScript==
// @name Plurk detect hide_plurks_before
// @namespace me.qbane
// @version 1
// @match https://*.plurk.com/*
// @run-at document-idle
// ==/UserScript==
const PGUSER = unsafeWindow.GLOBAL?.page_user?.hide_plurks_before
if (PGUSER) {
const el = document.createElement('div')
el.style.cssText = `padding: 20px 40px; position: fixed; top: 100%; left: 50%; transform: translate(-50%, -100%);
background: #281414; color: white; text-align: center; font-size: 2rem; box-shadow: 0 0 20px 16px #f008;`
el.innerHTML = `hide_plurks_before is set to <b>${PGUSER.toISOString().replace(/T.+$/, '')}</b>`
document.body.appendChild(el)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment