Crypto Library (OP)
Legendary

Activity: 1666
Merit: 1186
Leading Crypto Sports Betting & Casino Platform
|
 |
July 28, 2026, 07:46:49 PM Last edit: Today at 07:08:00 PM by Crypto Library |
|
Bitcointalk Locked Thread Popup + Live Detection This topic came to my attention a minute ago, I wanted to create a script on it a long time ago, but due to lack of time and laziness I didn't do it. But today I tried it with the help of AI. The Feature of this script is-- If you accidentally go to create a post on a locked topic without noticing that the topic is locked, a popup message will appear informing you that the topic is locked.
- Another special feature of this is that if you are writing a post on a topic and the moderator locks it, then within five seconds it will show you a popup notification that the topic has been locked.
This way, at least you won't have to waste your time after the topic is locked. And to use this script, you need to download tampermonkey and then open it.then, Create a new script> copy this code and paste and save> now enjoyOr you can directly add to tamperkmoney by one clicking- Bitcointalk Locked Thread Popup + Live Detection leasted version// ==UserScript== // @name Bitcointalk Locked Thread Popup + Live Detection leasted version // @namespace https://bitcointalk.org/ // @version 3.0 // @description Show a modern popup if a thread is locked or becomes locked while writing. // @author Crypto Library // @homepageURL https://bitcointalk.org/ // @supportURL https://bitcointalk.org/index.php?action=profile // @match https://bitcointalk.org/index.php?action=post* // @grant GM_xmlhttpRequest // @connect bitcointalk.org // ==/UserScript==
(function () { 'use strict';
const CHECK_INTERVAL = 5000;
let popupShown = false;
// ------------------------ // Popup // ------------------------
function showPopup() {
if (popupShown) return; popupShown = true;
const overlay = document.createElement("div");
overlay.style.cssText = ` position:fixed; inset:0; background:rgba(0,0,0,.55); display:flex; justify-content:center; align-items:center; z-index:999999; animation:fadeIn .25s ease; `;
const popup = document.createElement("div");
popup.style.cssText = ` width:420px; max-width:90%; background:#fff; border-radius:14px; padding:28px; text-align:center; box-shadow:0 12px 35px rgba(0,0,0,.35); animation:pop .25s ease; font-family:Arial,sans-serif; `;
popup.innerHTML = ` <div style="font-size:60px;">🔒</div>
<h2 style="margin:10px 0;color:#d32f2f;"> Thread Locked </h2>
<p style="font-size:15px;color:#444;line-height:1.6;"> This topic has been locked.<br><br> You cannot submit your reply anymore. </p>
<button id="btcPopupOK" style=" margin-top:20px; padding:10px 30px; border:none; border-radius:8px; background:#1976d2; color:white; font-size:15px; cursor:pointer; "> OK </button> `;
overlay.appendChild(popup); document.body.appendChild(overlay);
function closePopup() { overlay.remove(); }
document.getElementById("btcPopupOK").onclick = closePopup;
document.addEventListener("keydown", function esc(e) { if (e.key === "Escape") { closePopup(); document.removeEventListener("keydown", esc); } });
}
// ------------------------ // CSS // ------------------------
const style = document.createElement("style");
style.textContent = ` @keyframes fadeIn{ from{opacity:0;} to{opacity:1;} }
@keyframes pop{ from{ transform:scale(.8); opacity:0; } to{ transform:scale(1); opacity:1; } } `;
document.head.appendChild(style);
// ------------------------ // Get Topic ID // ------------------------
const match = location.href.match(/topic=(\d+)/);
if (!match) return;
const topicId = match[1];
let lastState = null;
// ------------------------ // Detect Locked State // ------------------------
function parseLocked(html) {
const doc = new DOMParser().parseFromString(html, "text/html");
const links = [...doc.querySelectorAll("a")];
const hasReply = links.some(a => a.textContent.trim().toLowerCase() === "reply" );
return !hasReply;
}
// ------------------------ // Check Thread // ------------------------
function checkThread() {
GM_xmlhttpRequest({
method: "GET",
url: `https://bitcointalk.org/index.php?topic=${topicId}.0&_=${Date.now()}`,
headers: { "Cache-Control": "no-cache" },
onload: function (r) {
if (r.status !== 200) return;
const locked = parseLocked(r.responseText);
// Initial check if (lastState === null) {
lastState = locked;
if (locked) { showPopup(); }
return; }
// Unlocked -> Locked if (lastState === false && locked) { showPopup(); }
lastState = locked;
}
});
}
// Initial check checkThread();
// Live monitoring setInterval(checkThread, CHECK_INTERVAL);
})();
Output
|
| ..Stake.com.. | | | ▄████████████████████████████████████▄ ██ ▄▄▄▄▄▄▄▄▄▄ ▄▄▄▄▄▄▄▄▄▄ ██ ▄████▄ ██ ▀▀▀▀▀▀▀▀▀▀ ██████████ ▀▀▀▀▀▀▀▀▀▀ ██ ██████ ██ ██████████ ██ ██ ██████████ ██ ▀██▀ ██ ██ ██ ██████ ██ ██ ██ ██ ██ ██ ██████ ██ █████ ███ ██████ ██ ████▄ ██ ██ █████ ███ ████ ████ █████ ███ ████████ ██ ████ ████ ██████████ ████ ████ ████▀ ██ ██████████ ▄▄▄▄▄▄▄▄▄▄ ██████████ ██ ██ ▀▀▀▀▀▀▀▀▀▀ ██ ▀█████████▀ ▄████████████▄ ▀█████████▀ ▄▄▄▄▄▄▄▄▄▄▄▄███ ██ ██ ███▄▄▄▄▄▄▄▄▄▄▄▄ ██████████████████████████████████████████ | | | | | | ▄▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▄ █ ▄▀▄ █▀▀█▀▄▄ █ █▀█ █ ▐ ▐▌ █ ▄██▄ █ ▌ █ █ ▄██████▄ █ ▌ ▐▌ █ ██████████ █ ▐ █ █ ▐██████████▌ █ ▐ ▐▌ █ ▀▀██████▀▀ █ ▌ █ █ ▄▄▄██▄▄▄ █ ▌▐▌ █ █▐ █ █ █▐▐▌ █ █▐█ ▀▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▀█ | | | | | | ▄▄█████████▄▄ ▄██▀▀▀▀█████▀▀▀▀██▄ ▄█▀ ▐█▌ ▀█▄ ██ ▐█▌ ██ ████▄ ▄█████▄ ▄████ ████████▄███████████▄████████ ███▀ █████████████ ▀███ ██ ███████████ ██ ▀█▄ █████████ ▄█▀ ▀█▄ ▄██▀▀▀▀▀▀▀██▄ ▄▄▄█▀ ▀███████ ███████▀ ▀█████▄ ▄█████▀ ▀▀▀███▄▄▄███▀▀▀ | | | ..PLAY NOW.. |
|
|
|
tbct_mt2
Legendary

Activity: 3052
Merit: 1049
|
 |
July 28, 2026, 07:52:03 PM |
|
2. Another special feature of this is that if you are writing a post on a topic and the moderator locks it, then within five seconds it will show you a popup notification that the topic has been locked. This way, at least you won't have to waste your time after the topic is locked.
Updating the topic lock/unlock status every five-seconds is very amazing. But if the topic is locked by the topic starter, is the popup notification appears the same way if it was locked by a moderator? I guess it works the same and likely you forgot about topic starter when writing this. Another thing How about a topic deletion when I am writing my thread?
|
RAZED | | | 100% | WELCOME BONUS | │ | █████████████████████ █████████████████████████ ████████████▀░░░░▀███████ ██████████▀░░▄▀▀▄░░▀█████ ██████████▄▄██▄▄██▄░▀████ █████▀░░░░░░░▀██░░█░░████ ████░░████▀▀█░░██▀░░▄████ ████░░████▄▄█░░█░░▄██████ ████░░█▀▀████░░██████████ ████░░█▄▄███▀░░██████████ █████▄░░░░░░░▄███████████ █████████████████████████ █████████████████████ | █████████████████████ █████████████████████████ ██████████▀▀░░░░░▀▀██████ ████████▀░░▄▄█░░▀▄░░█████ ██████▀░░▄█████▄░░▀░░████ █████░░▄████▄▀░░█▄▄░░████ ████░░▄███▄▀░░▄▀██▀░░████ ████░░▀▀██░░▄▀███▀░░█████ ████░░▄░░▀█████▀░░▄██████ █████░░▀▄░░█▀▀░░▄████████ ██████▄▄░░░░░▄▄██████████ █████████████████████████ █████████████████████ | | |
NO KYC | | | RAZE THE LIMITS ► PLAY NOW |
|
|
|
oll
Full Member
 

Activity: 316
Merit: 151
old oll
|
 |
July 28, 2026, 07:56:27 PM |
|
This way, at least you won't have to waste your time after the topic is locked.
And to use this script, you need to download tampermonkey and then open it. then,
I think that any forum participant will understand me that it is always a shame to write a big post and after 15 minutes, when it is already doomed, to see that the topic is closed. Thank you for taking the time to create the script.
|
|
|
|
|
Crypto Library (OP)
Legendary

Activity: 1666
Merit: 1186
Leading Crypto Sports Betting & Casino Platform
|
 |
July 28, 2026, 08:42:29 PM Last edit: July 28, 2026, 09:27:21 PM by Crypto Library |
|
But if the topic is locked by the topic starter, is the popup notification appears the same way if it was locked by a moderator? I guess it works the same and likely you forgot about topic starter when writing this.
Yes and Yes Another thing How about a topic deletion when I am writing my thread?
I'm still working on this, I've seen it working successfully on other locked topics, and also on the others topic I made in the previous time even in meta board. But when I went for quote this only thread, it showed the locked pop-up message even when it's unlocked. If I'm not mistaken, you explained this matter? After a long time, I realized where the main problem really is, and that is What I originally thought was a bug is actually not a bug. It's actually the source code used in this topic. Anyway, have you tried this? For try this instantly, open your own previous topic in a tab, quote it there, type something, and then go to that topic in another tab, lock that topic, then come back to the quoted tab and if the pop-up message appears. And if there is any bug, please let me know.
|
| ..Stake.com.. | | | ▄████████████████████████████████████▄ ██ ▄▄▄▄▄▄▄▄▄▄ ▄▄▄▄▄▄▄▄▄▄ ██ ▄████▄ ██ ▀▀▀▀▀▀▀▀▀▀ ██████████ ▀▀▀▀▀▀▀▀▀▀ ██ ██████ ██ ██████████ ██ ██ ██████████ ██ ▀██▀ ██ ██ ██ ██████ ██ ██ ██ ██ ██ ██ ██████ ██ █████ ███ ██████ ██ ████▄ ██ ██ █████ ███ ████ ████ █████ ███ ████████ ██ ████ ████ ██████████ ████ ████ ████▀ ██ ██████████ ▄▄▄▄▄▄▄▄▄▄ ██████████ ██ ██ ▀▀▀▀▀▀▀▀▀▀ ██ ▀█████████▀ ▄████████████▄ ▀█████████▀ ▄▄▄▄▄▄▄▄▄▄▄▄███ ██ ██ ███▄▄▄▄▄▄▄▄▄▄▄▄ ██████████████████████████████████████████ | | | | | | ▄▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▄ █ ▄▀▄ █▀▀█▀▄▄ █ █▀█ █ ▐ ▐▌ █ ▄██▄ █ ▌ █ █ ▄██████▄ █ ▌ ▐▌ █ ██████████ █ ▐ █ █ ▐██████████▌ █ ▐ ▐▌ █ ▀▀██████▀▀ █ ▌ █ █ ▄▄▄██▄▄▄ █ ▌▐▌ █ █▐ █ █ █▐▐▌ █ █▐█ ▀▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▀█ | | | | | | ▄▄█████████▄▄ ▄██▀▀▀▀█████▀▀▀▀██▄ ▄█▀ ▐█▌ ▀█▄ ██ ▐█▌ ██ ████▄ ▄█████▄ ▄████ ████████▄███████████▄████████ ███▀ █████████████ ▀███ ██ ███████████ ██ ▀█▄ █████████ ▄█▀ ▀█▄ ▄██▀▀▀▀▀▀▀██▄ ▄▄▄█▀ ▀███████ ███████▀ ▀█████▄ ▄█████▀ ▀▀▀███▄▄▄███▀▀▀ | | | ..PLAY NOW.. |
|
|
|
libert19
Legendary

Activity: 3304
Merit: 1177
Signatures are not endorsements, DYOR!
|
 |
July 28, 2026, 08:54:08 PM |
|
I do not mean to be mean (woa! Woa! Two means but different meanings — this is some wordplay isn't it). But, the moment I saw the title, I saw the author — I knew it was going to be AI.
The presence that Ninja and Powerglove have, is next to none that I don't even expect much unless it's from those two.
|
|
|
|
Crypto Library (OP)
Legendary

Activity: 1666
Merit: 1186
Leading Crypto Sports Betting & Casino Platform
|
 |
July 28, 2026, 09:16:21 PM |
|
I do not mean to be mean (woa! Woa! Two means but different meanings — this is some wordplay isn't it). But, the moment I saw the title, I saw the author — I knew it was going to be AI.
Obviously I used AI to create this script, and I already mentioned it on the starting point of this topic,,,, I am not really a pro at programming or coding; my knowledge is tiny here, and that is why I have spent almost three hours prompting and debugging at my current time to get the last output which is some how effective. But even then, if there are more bugs found, Kindly let me know. And about the author on the script, I used my name because of that 3hours. The presence that Ninja and Powerglove have, is next to none that I don't even expect much unless it's from those two.
No single word about them, they are the real boss here, and that's why I've already mentioned them for doing the big job here.
|
| ..Stake.com.. | | | ▄████████████████████████████████████▄ ██ ▄▄▄▄▄▄▄▄▄▄ ▄▄▄▄▄▄▄▄▄▄ ██ ▄████▄ ██ ▀▀▀▀▀▀▀▀▀▀ ██████████ ▀▀▀▀▀▀▀▀▀▀ ██ ██████ ██ ██████████ ██ ██ ██████████ ██ ▀██▀ ██ ██ ██ ██████ ██ ██ ██ ██ ██ ██ ██████ ██ █████ ███ ██████ ██ ████▄ ██ ██ █████ ███ ████ ████ █████ ███ ████████ ██ ████ ████ ██████████ ████ ████ ████▀ ██ ██████████ ▄▄▄▄▄▄▄▄▄▄ ██████████ ██ ██ ▀▀▀▀▀▀▀▀▀▀ ██ ▀█████████▀ ▄████████████▄ ▀█████████▀ ▄▄▄▄▄▄▄▄▄▄▄▄███ ██ ██ ███▄▄▄▄▄▄▄▄▄▄▄▄ ██████████████████████████████████████████ | | | | | | ▄▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▄ █ ▄▀▄ █▀▀█▀▄▄ █ █▀█ █ ▐ ▐▌ █ ▄██▄ █ ▌ █ █ ▄██████▄ █ ▌ ▐▌ █ ██████████ █ ▐ █ █ ▐██████████▌ █ ▐ ▐▌ █ ▀▀██████▀▀ █ ▌ █ █ ▄▄▄██▄▄▄ █ ▌▐▌ █ █▐ █ █ █▐▐▌ █ █▐█ ▀▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▀█ | | | | | | ▄▄█████████▄▄ ▄██▀▀▀▀█████▀▀▀▀██▄ ▄█▀ ▐█▌ ▀█▄ ██ ▐█▌ ██ ████▄ ▄█████▄ ▄████ ████████▄███████████▄████████ ███▀ █████████████ ▀███ ██ ███████████ ██ ▀█▄ █████████ ▄█▀ ▀█▄ ▄██▀▀▀▀▀▀▀██▄ ▄▄▄█▀ ▀███████ ███████▀ ▀█████▄ ▄█████▀ ▀▀▀███▄▄▄███▀▀▀ | | | ..PLAY NOW.. |
|
|
|
Upgrade00
Legendary

Activity: 2828
Merit: 2905
Community Manager - Brand Promotions ✅
|
 |
July 28, 2026, 09:23:53 PM |
|
- If you accidentally go to create a post on a locked topic without noticing that the topic is locked, a popup message will appear informing you that the topic is locked.
- Another special feature of this is that if you are writing a post on a topic and the moderator locks it, then within five seconds it will show you a popup notification that the topic has been locked.
• The forum already fixed the first part. The reply button does not show up if the thread is locked and if you click on the quote button above any reply there you'll see the message at the top telling you that you cannot actually reply there. • The second part will be useful for most. I have experienced that a few times, typing put a reply and then hitting a wall when j try to post it. Can you share some visuals about how the pop up appears on the screen?[/list]
|
|
|
|
Crypto Library (OP)
Legendary

Activity: 1666
Merit: 1186
Leading Crypto Sports Betting & Casino Platform
|
 |
July 28, 2026, 10:38:43 PM |
|
|
| ..Stake.com.. | | | ▄████████████████████████████████████▄ ██ ▄▄▄▄▄▄▄▄▄▄ ▄▄▄▄▄▄▄▄▄▄ ██ ▄████▄ ██ ▀▀▀▀▀▀▀▀▀▀ ██████████ ▀▀▀▀▀▀▀▀▀▀ ██ ██████ ██ ██████████ ██ ██ ██████████ ██ ▀██▀ ██ ██ ██ ██████ ██ ██ ██ ██ ██ ██ ██████ ██ █████ ███ ██████ ██ ████▄ ██ ██ █████ ███ ████ ████ █████ ███ ████████ ██ ████ ████ ██████████ ████ ████ ████▀ ██ ██████████ ▄▄▄▄▄▄▄▄▄▄ ██████████ ██ ██ ▀▀▀▀▀▀▀▀▀▀ ██ ▀█████████▀ ▄████████████▄ ▀█████████▀ ▄▄▄▄▄▄▄▄▄▄▄▄███ ██ ██ ███▄▄▄▄▄▄▄▄▄▄▄▄ ██████████████████████████████████████████ | | | | | | ▄▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▄ █ ▄▀▄ █▀▀█▀▄▄ █ █▀█ █ ▐ ▐▌ █ ▄██▄ █ ▌ █ █ ▄██████▄ █ ▌ ▐▌ █ ██████████ █ ▐ █ █ ▐██████████▌ █ ▐ ▐▌ █ ▀▀██████▀▀ █ ▌ █ █ ▄▄▄██▄▄▄ █ ▌▐▌ █ █▐ █ █ █▐▐▌ █ █▐█ ▀▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▀█ | | | | | | ▄▄█████████▄▄ ▄██▀▀▀▀█████▀▀▀▀██▄ ▄█▀ ▐█▌ ▀█▄ ██ ▐█▌ ██ ████▄ ▄█████▄ ▄████ ████████▄███████████▄████████ ███▀ █████████████ ▀███ ██ ███████████ ██ ▀█▄ █████████ ▄█▀ ▀█▄ ▄██▀▀▀▀▀▀▀██▄ ▄▄▄█▀ ▀███████ ███████▀ ▀█████▄ ▄█████▀ ▀▀▀███▄▄▄███▀▀▀ | | | ..PLAY NOW.. |
|
|
|
tbct_mt2
Legendary

Activity: 3052
Merit: 1049
|
 |
July 29, 2026, 04:41:10 AM |
|
But if the topic is locked by the topic starter, is the popup notification appears the same way if it was locked by a moderator? I guess it works the same and likely you forgot about topic starter when writing this.
Yes and Yes Thanks for confirmation. So it's time for you to edit the userscript feature description a little bit. From "Another special feature of this is that if you are writing a post on a topic and the moderator locks it, then within five seconds" to "Another special feature of this is that if you are writing a post on a topic and the moderator or topic starter locks it, then within five seconds" Anyway, have you tried this?
No, I have yet tried it and I don't have intention to try it. Situations for this to happen (a topic starter or moderator) lock a thread or delete a thread when I am posting is not too high but anyway you made a good userscript for people who need it. Keep up your good work.
|
RAZED | | | 100% | WELCOME BONUS | │ | █████████████████████ █████████████████████████ ████████████▀░░░░▀███████ ██████████▀░░▄▀▀▄░░▀█████ ██████████▄▄██▄▄██▄░▀████ █████▀░░░░░░░▀██░░█░░████ ████░░████▀▀█░░██▀░░▄████ ████░░████▄▄█░░█░░▄██████ ████░░█▀▀████░░██████████ ████░░█▄▄███▀░░██████████ █████▄░░░░░░░▄███████████ █████████████████████████ █████████████████████ | █████████████████████ █████████████████████████ ██████████▀▀░░░░░▀▀██████ ████████▀░░▄▄█░░▀▄░░█████ ██████▀░░▄█████▄░░▀░░████ █████░░▄████▄▀░░█▄▄░░████ ████░░▄███▄▀░░▄▀██▀░░████ ████░░▀▀██░░▄▀███▀░░█████ ████░░▄░░▀█████▀░░▄██████ █████░░▀▄░░█▀▀░░▄████████ ██████▄▄░░░░░▄▄██████████ █████████████████████████ █████████████████████ | | |
NO KYC | | | RAZE THE LIMITS ► PLAY NOW |
|
|
|
|