Bitcoin Forum
June 04, 2026, 11:48:31 AM *
News: Latest Bitcoin Core release: 31.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1] 2 »  All
  Print  
Author Topic: [Userscript] Bitcointalk Merit Automation: Queue & Schedule Merit Distribution  (Read 494 times)
promise444c5 (OP)
Hero Member
*****
Offline

Activity: 1036
Merit: 868


All things are numbers


View Profile WWW
May 30, 2026, 05:12:45 PM
Last edit: June 03, 2026, 07:55:23 PM by promise444c5
Merited by Welsh (13), vapourminer (11), Xal0lex (8), LoyceV (6), hugeblack (5), Mia Chloe (5), joker_josue (3), TryNinja (2), ABCbits (1), *Ace* (1), TypoTonic (1)
 #1

After this request by  Vapourminer on  this thread : can "recently" be used in the sent merit list too? ..which was also created by him , I decided to created a Userscript that can handle his request..

The Userscript helps you create a  queue of posts that you want to merit later when you are active [i.e. when you make a post].


Although the script was specifically designed for Merit Sources, any forum user can use it. However, I noticed the logic mostly benefits those who need to hide their "online status" whenever they want to merit a post.

To fix that.. I created  a Second script for those that wish to merit a post but for a reason they can’t at a particular moment , probably because they are out of Smerit or just want to wait  before sending merit .

This second Userscript allows you to schedule a precise date and time to deliver your selected amount of merit to a post.

Script One [Post_Trigger]: - updated 03/06/26/19:55
Code:
// ==UserScript==
// @name         Bitcointalk Merit Automation [Post_Trigger]
// @namespace    http://...
// @version      1.0
// @description  Queue posts to merit them later.. User has to login for scrpt to load.
// @author       promise444c5
// @match        https://bitcointalk.org/index.php?topic=*
// @match        https://bitcointalk.org/index.php?action=post*
// @noframes
// @grant        GM_getValue
// @grant        GM_setValue
// @grant        GM_addStyle
// ==/UserScript==

(() => {
  "use strict";

  GM_addStyle(`
       /* Modal Overlay */
        #merit-queue-modal { display: none; position: fixed; z-index: 9999; left: 0; top: 0; width: 100%; height: 100%; background-color: rgba(0,0,0,0.6); backdrop-filter: blur(3px); }

        /* Modal */
        #merit-queue-content {
            background-color: #ffffff; margin: 4% auto; padding: 24px; border-radius: 12px;
            width: 85%; max-width: 850px; max-height: 85vh; /* Keep within viewport */
            display: flex; flex-direction: column; /* Allows nested list to fill space & scroll */
            box-shadow: 0 10px 40px rgba(0,0,0,0.3); color: #333; font-family: system-ui, -apple-system, sans-serif;
            box-sizing: border-box; max-height: 80vh; overflow-y: auto; to #merit-queue-content
        }

        /* Header & Close */
        .mq-close { color: #aaa; float: right; font-size: 28px; font-weight: bold; cursor: pointer; transition: color 0.2s; line-height: 1; }
        .mq-close:hover { color: #e74c3c; }
        #merit-queue-content h2 { margin-top: 0; margin-bottom: 5px; border-bottom: 2px solid #f0f0f0; padding-bottom: 12px; font-size: 20px; color: #2c3e50;}

        /* Scrolling List */
        #mq-list {
            flex-grow: 1; overflow-y: auto; overflow-x: hidden;
            padding-right: 12px; margin: 15px 0;
            display: flex; flex-direction: column; gap: 10px;
        }

        /* Smooth Scrollbar for mq-list */
        #mq-list::-webkit-scrollbar { width: 8px; }
        #mq-list::-webkit-scrollbar-track { background: #f8f9fa; border-radius: 4px; }
        #mq-list::-webkit-scrollbar-thumb { background: #c1c1c1; border-radius: 4px; }
        #mq-list::-webkit-scrollbar-thumb:hover { background: #a8a8a8; }

        /* Queue Item Cards */
        .mq-item {
            display: flex; align-items: center; justify-content: space-between;
            background: #f8f9fc; padding: 16px; border-radius: 8px; border: 1px solid #eaedf1;
            transition: all 0.2s ease-in-out;
            flex-wrap: wrap; gap: 10px;
        }
        .mq-item > div:nth-child(2) {
            display: flex;
            align-items: center;
            gap: 15px;
            flex-wrap: wrap;

         }
        .mq-item:hover { transform: translateY(-2px); box-shadow: 0 6px 15px rgba(0,0,0,0.05); border-color: #d1d5db; flex:wrap }

        /* Inputs & Form Elements */
        .mq-amount, .mq-date { padding: 6px 10px; border: 0.5px solid #cbd5e1; border-radius: 6px; font-family: inherit; font-size: 13px; color: #333; outline: none; transition: border-color 0.2s; }
        .mq-amount:focus, .mq-date:focus { border-color: #3b82f6; }

        /* Action Buttons */
        .mq-remove {
            background: #fee2e2; color: #ef4444; border: none; border-radius: 50%;
            width: 32px; height: 32px; font-weight: bold; cursor: pointer;
            display: flex; align-items: center; justify-content: center; transition: all 0.2s; margin-left: 20px;
            margin: 0 !important;
            flex-shrink: 0;
        }
        .mq-remove:hover { background: #fca5a5; color: #7f1d1d; transform: scale(1.05); }

        #mq-save-container { text-align: center; margin-top: auto; padding-top: 15px; border-top: 2px solid #f0f0f0; }
        #mq-save-btn {
            padding: 12px 35px; font-size: 15px; font-weight: 600; cursor: pointer;
            background: #047857; color: #fff;
            border: none; border-radius: 6px; box-shadow: 0 4px 10px rgba(16, 185, 129, 0.3); transition: all 0.2s;
        }
        #mq-save-btn:hover { background: #059669; box-shadow: 0 6px 14px rgba(16, 185, 129, 0.4); translateY(-1px); }
        #mq-save-btn:active { transform: translateY(2px); box-shadow: 0 2px 5px rgba(16, 185, 129, 0.3); }

        #open-mq-btn { position: fixed; bottom: 25px; right: 25px; padding: 12px 20px; font-weight: 600; background: #375f82; color: white; border: none; border-radius: 50px; cursor: pointer; z-index: 9998; box-shadow: 0 6px 12px rgba(59, 130, 246, 0.3); transition: transform 0.2s; }
        #open-mq-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 16px rgba(59, 130, 246, 0.4); opacity:0.95; background:#3e6488 }`);

  /* Loads active queue from storage on script initialization*/
  let meritQueue = GM_getValue("merit_queue", []);

  const queueBtnTemplate = document.createElement("a");
  queueBtnTemplate.href = "javascript:void(0);";
  queueBtnTemplate.innerHTML =
    '&nbsp;<span style="vertical-align: middle;"><b>+Queue</b></span>';

  const topicMatch = window.location.href.match(/topic=(\d+)/);
  const topicId = topicMatch ? topicMatch[1] : "0";

  document.querySelectorAll('a[href*="action=merit;msg="]').forEach((link) => {
    const match = link.href.match(/msg=(\d+)/);
    if (!match) return;

    const [, msgId] = match;

    /* Optional Chaining & Nullish Coalescing */
    const username =
      link
        .closest(".windowbg, .windowbg2")
        ?.querySelector(".poster_info b a")
        ?.textContent.trim() ?? "Unknown";

    const queueBtn = queueBtnTemplate.cloneNode(true);
    queueBtn.addEventListener("click", (e) => {
      e.preventDefault();
      /* confirmation dialog, for unexpected clicks  */
      if (confirm(`Are you sure you want to queue 1 merit for ${username}?`)) {
        addToQueue(topicId, msgId, username);
      }
    });

    link.parentNode.insertBefore(queueBtn, link.nextSibling);
  });

  const addToQueue = (topicId, msgId, username) => {
    if (meritQueue.some((item) => item.msgId === msgId))
      return alert("Post is already in the queue!");

    meritQueue = [
      ...meritQueue,
      {
        topicId,
        msgId,
        username,
        amount: 1,
      },
    ];

    GM_setValue("merit_queue", meritQueue);
      alert(`Added a post from ${username} to Merit Queue`);

  };

  /* Modal*/
  document.body.insertAdjacentHTML(
    "beforeend",
    `
        <div id="merit-queue-modal">
            <div id="merit-queue-content">
              <div>
                <span class="mq-close">&times;</span>
                <h2 style="margin-top:0; border-bottom:2px solid #ccc; padding-bottom:10px;">Merit Queue Settings</h2>
              </div>
                <div id="mq-list"></div>
                <div id="mq-save-container"><button id="mq-save-btn">Save Changes</button></div>
            </div>
        </div>
        <button id="open-mq-btn">View Merit Queue</button>
    `,
  );

  const modal = document.getElementById("merit-queue-modal");
  const listContainer = document.getElementById("mq-list");

  const renderQueue = () => {
    if (!meritQueue.length) {
      listContainer.innerHTML = "<p>No posts in queue.</p>";
      return;
    }

    /* Queue items */
    listContainer.innerHTML = meritQueue
      .map((item, index) => {
        const predefinedMeritValues = [1, 2, 3, 4, 6, 8, 10, 20, 40, 50];
        const options = predefinedMeritValues
          .map(
            (i) =>
              `<option value="${i}" ${item.amount == i ? "selected" : ""}>${i}</option>`,
          )
          .join("");

        return `
                <div class="mq-item" ${item.status === "failed" ? 'style="background-color: #ffe6e6; padding: 10px;"' : ""}>
                    <div>
                        <strong>User: ${item.username}</strong><br>
                        <a href="https://bitcointalk.org/index.php?topic=${item.topicId}.msg${item.msgId}#msg${item.msgId}" target="_blank" style="font-size:12px;">Link to Msg: #${item.msgId}</a>
                        ${item.error ? `<br><span style="color:red; font-size:12px;"><b>Error:</b> ${item.error}</span>` : ""}
                    </div>
                    <div>
                        <label>Merit: <select class="mq-amount" data-index="${index}">${options}</select></label>
                        <!-- (Keep your date input line here if modifying merit_automation.user.js) -->
                        <button class="mq-remove" data-index="${index}" title="Remove from queue" style="margin-left: 15px; color: red;">X</button>
                    </div>
                </div>
            `;
      })
      .reverse()
      .join("");
  };

  /* remove button */
  listContainer.addEventListener("click", (e) => {
    if (e.target?.classList.contains("mq-remove")) {
      meritQueue.splice(e.target.dataset.index, 1);
      GM_setValue("merit_queue", meritQueue);
      renderQueue();
    }
  });

  document.getElementById("open-mq-btn").onclick = () => {
    meritQueue = GM_getValue("merit_queue", []);
    renderQueue();
    modal.style.display = "block";
  };

  document.querySelector(".mq-close").onclick = () => {
    modal.style.display = "none";
  };

  window.onclick = (e) => {
    if (e.target === modal) {
      modal.style.display = "none";
    }
  };

  document.getElementById("mq-save-btn").onclick = () => {
    document.querySelectorAll(".mq-amount").forEach((sel) => {
      meritQueue[sel.dataset.index].amount = sel.value;
    });
    GM_setValue("merit_queue", meritQueue);
    alert("Queue settings successfully saved!");
    modal.style.display = "none";
  };

    /* Main automation logic */
  const processMeritQueue = async () => {
    const isNewPost = GM_getValue("NewPost", false);
    if (!isNewPost) return;
   
    /* Clear trigger flag immediately */
    GM_setValue("NewPost", false);

    let queue = GM_getValue("merit_queue", []);
    if (!queue.length) return;

    const sc = document
      .querySelector('a[href*="action=logout;sesc="]')
      ?.href.match(/sesc=([a-f0-9]+)/)?.[1];
    if (!sc) return;

    for (let i = queue.length - 1; i >= 0; i--) {
      queue = GM_getValue("merit_queue", []);
     
      let item = queue[i];
      if (!item) continue;
     
      /* Prevent unnecessary network requests for known failed items */
      if (item.status === "failed") continue;

      console.log(
        `Attempting to dispense ${item.amount} merit to MsgID ${item.msgId}...`,
      );

      const formData = new URLSearchParams({
        merits: item.amount,
        msgID: item.msgId,
        sc,
      });

      try {
        const response = await fetch(
          `https://bitcointalk.org/index.php?action=merit;msg=${item.msgId}`,
          {
            method: "POST",
            headers: {
              "Content-Type": "application/x-www-form-urlencoded",
              Accept:
                "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8",
            },
            body: formData.toString(),
          },
        );

        if (response.ok) {
          const html = await response.text();
         
          if (html.includes("An Error Has Occurred")) {
            console.error(`Failed to send merit for MsgID ${item.msgId}`);
            let errorMsg = "Unknown error occurred.";
           
            const lowerHtml = html.toLowerCase();

            /** Checks for error
             * Note: not sure about the exact message for "no merit" yet, so I'm doing a contains check for "enough smerit" which should cover both "not enough sMerit" and "you don't have any sMerit" maybe
             * For any reason , if the error message doesn't match or there are changes in the future, it will default to "Unknown error occurred." instead of just saying "Failed to send merit" which is less informative for the user.
             * */
            if (lowerHtml.includes("enough smerit")) {
              errorMsg = "Not enough sMerit.";
            } else if (lowerHtml.includes("cannot send merit to yourself")) {
              errorMsg = "Cannot send merit to yourself tuff guy.";
            }

            /** Flags and update  the failed item in the queue instead of deleting it */
            queue[i].status = "failed";
            queue[i].error = errorMsg;
            GM_setValue("merit_queue", queue);
           
          } else {
            console.log(
              `Successfully sent ${item.amount} merit for MsgID ${item.msgId}`,
            );
           
            // Remove by exact index mapping (faster than filter)
            queue.splice(i, 1);
            GM_setValue("merit_queue", queue);
          }
        }
        await new Promise((res) => setTimeout(res, 3000)); // wait to prevent rate-limiting before next attempt
      } catch (err) {
        console.error("Error dispensing merit, keeping in queue:", err);
      }
    }
  };

  const postForm =
    document.forms.postmodify ||
    document.querySelector('form[action*="action=post2"]');
   
  if (postForm) {
    postForm.addEventListener("submit", () => {
      GM_setValue("NewPost", true);
    });
  }

  processMeritQueue();
})();


Script Two [ No_Post_Trigger] : - updated 03/06/26/19:55
Code:
// ==UserScript==
// @name         Bitcointalk Merit Automation [No_Post_Trigger]
// @namespace    http://...
// @version      1.0
// @description  Queue posts to merit them later with precise time execution.. User has to login for scrpt to load.
// @author       promise444c5
// @match        https://bitcointalk.org/index.php?topic=*
// @noframes
// @grant        GM_getValue
// @grant        GM_setValue
// @grant        GM_addStyle
// ==/UserScript==

(() => {
  "use strict";

  const getLocalISOTime = (dateObj) => {
    const offset = dateObj.getTimezoneOffset() * 60000;
    return new Date(dateObj - offset).toISOString().slice(0, 16);
  };

  GM_addStyle(`
        /* Modal Overlay */
        #merit-queue-modal { display: none; position: fixed; z-index: 9999; left: 0; top: 0; width: 100%; height: 100%; background-color: rgba(0,0,0,0.6); backdrop-filter: blur(3px); }

        /* Modal */
        #merit-queue-content {
            background-color: #ffffff; margin: 4% auto; padding: 24px; border-radius: 12px;
            width: 85%; max-width: 850px; max-height: 85vh; /* Keep within viewport */
            display: flex; flex-direction: column; /* Allows nested list to fill space & scroll */
            box-shadow: 0 10px 40px rgba(0,0,0,0.3); color: #333; font-family: system-ui, -apple-system, sans-serif;
            box-sizing: border-box; max-height: 80vh; overflow-y: auto; to #merit-queue-content
        }

        /* Header & Close */
        .mq-close { color: #aaa; float: right; font-size: 28px; font-weight: bold; cursor: pointer; transition: color 0.2s; line-height: 1; }
        .mq-close:hover { color: #e74c3c; }
        #merit-queue-content h2 { margin-top: 0; margin-bottom: 5px; border-bottom: 2px solid #f0f0f0; padding-bottom: 12px; font-size: 20px; color: #2c3e50;}

        /* Scrolling List */
        #mq-list {
            flex-grow: 1; overflow-y: auto; overflow-x: hidden;
            padding-right: 12px; margin: 15px 0;
            display: flex; flex-direction: column; gap: 10px;
        }

        /* Smooth Scrollbar for mq-list */
        #mq-list::-webkit-scrollbar { width: 8px; }
        #mq-list::-webkit-scrollbar-track { background: #f8f9fa; border-radius: 4px; }
        #mq-list::-webkit-scrollbar-thumb { background: #c1c1c1; border-radius: 4px; }
        #mq-list::-webkit-scrollbar-thumb:hover { background: #a8a8a8; }

        /* Queue Item Cards */
        .mq-item {
            display: flex; align-items: center; justify-content: space-between;
            background: #f8f9fc; padding: 16px; border-radius: 8px; border: 1px solid #eaedf1;
            transition: all 0.2s ease-in-out;
            flex-wrap: wrap; gap: 10px;
        }
        .mq-item > div:nth-child(2) {
            display: flex;
            align-items: center;
            gap: 15px;
            flex-wrap: wrap;

         }
        .mq-item:hover { transform: translateY(-2px); box-shadow: 0 6px 15px rgba(0,0,0,0.05); border-color: #d1d5db; flex:wrap }

        /* Inputs & Form Elements */
        .mq-amount, .mq-date { padding: 6px 10px; border: 0.5px solid #cbd5e1; border-radius: 6px; font-family: inherit; font-size: 13px; color: #333; outline: none; transition: border-color 0.2s; }
        .mq-amount:focus, .mq-date:focus { border-color: #3b82f6; }

        /* Action Buttons */
        .mq-remove {
            background: #fee2e2; color: #ef4444; border: none; border-radius: 50%;
            width: 32px; height: 32px; font-weight: bold; cursor: pointer;
            display: flex; align-items: center; justify-content: center; transition: all 0.2s; margin-left: 20px;
            margin: 0 !important;
            flex-shrink: 0;
        }
        .mq-remove:hover { background: #fca5a5; color: #7f1d1d; transform: scale(1.05); }

        #mq-save-container { text-align: center; margin-top: auto; padding-top: 15px; border-top: 2px solid #f0f0f0; }
        #mq-save-btn {
            padding: 12px 35px; font-size: 15px; font-weight: 600; cursor: pointer;
            background: #047857; color: #fff;
            border: none; border-radius: 6px; box-shadow: 0 4px 10px rgba(16, 185, 129, 0.3); transition: all 0.2s;
        }
        #mq-save-btn:hover { background: #059669; box-shadow: 0 6px 14px rgba(16, 185, 129, 0.4); translateY(-1px); }
        #mq-save-btn:active { transform: translateY(2px); box-shadow: 0 2px 5px rgba(16, 185, 129, 0.3); }

        #open-mq-btn { position: fixed; bottom: 25px; right: 25px; padding: 12px 20px; font-weight: 600; background: #375f82; color: white; border: none; border-radius: 50px; cursor: pointer; z-index: 9998; box-shadow: 0 6px 12px rgba(59, 130, 246, 0.3); transition: transform 0.2s; }
        #open-mq-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 16px rgba(59, 130, 246, 0.4); opacity:0.95; background:#3e6488 }`);

  /* Loads active queue from storage on script initialization*/
  let meritQueue = GM_getValue("merit_queue", []);

  const queueBtnTemplate = document.createElement("a");
  queueBtnTemplate.href = "javascript:void(0);";
  queueBtnTemplate.innerHTML =
    '&nbsp;&nbsp;<span style="vertical-align: middle;"><b>+Queue</b></span>';

  const topicMatch = window.location.href.match(/topic=(\d+)/);
  const topicId = topicMatch ? topicMatch[1] : "0";


  document.querySelectorAll('a[href*="action=merit;msg="]').forEach((link) => {
    const match = link.href.match(/msg=(\d+)/);
    if (!match) return;

    const [, msgId] = match;

    /* Optional Chaining & Nullish Coalescing */
    const username =
      link
        .closest(".windowbg, .windowbg2")
        ?.querySelector(".poster_info b a")
        ?.textContent.trim() ?? "Unknown";

    const queueBtn = queueBtnTemplate.cloneNode(true);
    queueBtn.addEventListener("click", (e) => {
      e.preventDefault();
      /* confirmation dialog, for unexpected clicks  */
      if (confirm(`Are you sure you want to queue 1 merit for ${username}?`)) {
        addToQueue(topicId, msgId, username);
      }
    });

    link.parentNode.insertBefore(queueBtn, link.nextSibling);
  });

  const addToQueue = (topicId, msgId, username) => {
    if (meritQueue.some((item) => item.msgId === msgId))
      return alert("Post is already in the queue!");

    const tomorrow = new Date();
    tomorrow.setDate(tomorrow.getDate() + 1);

    meritQueue = [
      ...meritQueue,
      {
        topicId,
        msgId,
        username,
        amount: 1,
        date: getLocalISOTime(tomorrow),
      },
    ];
    console.log("Updated Merit Queue:", meritQueue);
    GM_setValue("merit_queue", meritQueue);
    alert(`Added a post from ${username} to Merit Queue`);
  };

  /* Modal*/
  document.body.insertAdjacentHTML(
    "beforeend",
    `
        <div id="merit-queue-modal">
            <div id="merit-queue-content">
                <div>
                  <span class="mq-close">&times;</span>
                  <h2 style="margin-top:0; border-bottom:2px solid #ccc; padding-bottom:10px;">Merit Queue Settings</h2>
                </div>
                <div id="mq-list"></div>
                <div id="mq-save-container"><button id="mq-save-btn">Save Changes</button></div>
            </div>
        </div>
        <button id="open-mq-btn">View Merit Queue</button>
    `,
  );

  const modal = document.getElementById("merit-queue-modal");
  const listContainer = document.getElementById("mq-list");

  const renderQueue = () => {
    if (!meritQueue.length) {
      listContainer.innerHTML = "<p>No posts in queue.</p>";
      return;
    }

    /*Queue items */
    listContainer.innerHTML = meritQueue
      .map((item, index) => {
        const predefinedMeritValues = [1, 2, 3, 4, 6, 8, 10, 20, 40, 50];
        const options = predefinedMeritValues
          .map(
            (i) =>
              `<option value="${i}" ${item.amount == i ? "selected" : ""}>${i}</option>`,
          )
          .join("");

        return `
                <div class="mq-item" ${item.status === "failed" ? 'style="background-color: #ffe6e6; padding: 10px;"' : ""}>
                    <div>
                        <strong>User: ${item.username}</strong><br>
                        <a href="https://bitcointalk.org/index.php?topic=${item.topicId}.msg${item.msgId}#msg${item.msgId}" target="_blank" style="font-size:12px;">Link to Msg: #${item.msgId}</a>
                        ${item.error ? `<br><span style="color:red; font-size:12px;"><b>Error:</b> ${item.error}</span>` : ""}
                    </div>
                    <div>
                        <label>Merit: <select class="mq-amount" data-index="${index}">${options}</select></label>
                        <label style="margin-left: 15px;">Date & Time: <input type="datetime-local" class="mq-date" data-index="${index}" value="${item.date}"></label>
                        <button class="mq-remove" data-index="${index}" title="Remove from queue" style="margin-left: 15px; color: red;">X</button>
                    </div>
                </div>
            `;
      })
      .reverse()
      .join("");
  };

  /* remove button */
  listContainer.addEventListener("click", (e) => {
    if (e.target?.classList.contains("mq-remove")) {
      meritQueue.splice(e.target.dataset.index, 1);
      GM_setValue("merit_queue", meritQueue);
      renderQueue();
    }
  });

  document.getElementById("open-mq-btn").onclick = () => {
    meritQueue = GM_getValue("merit_queue", []);
    renderQueue();
    modal.style.display = "block";
  };

  document.querySelector(".mq-close").onclick = () => {
    modal.style.display = "none";
  };

  window.onclick = (e) => {
    if (e.target === modal) {
      modal.style.display = "none";
    }
  };

  document.getElementById("mq-save-btn").onclick = () => {
    document.querySelectorAll(".mq-amount").forEach((sel) => {
      meritQueue[sel.dataset.index].amount = sel.value;
    });

    document.querySelectorAll(".mq-date").forEach((inp) => {
      meritQueue[inp.dataset.index].date = inp.value;
    });

    GM_setValue("merit_queue", meritQueue);
    alert("Queue settings successfully saved!");
    modal.style.display = "none";
  };

  /* Main automation logic */
  const processMeritQueue = async () => {
 let queue = GM_getValue("merit_queue", []);   
 if (!queue.length) return;

    const currentLocalTime = getLocalISOTime(new Date());

    const sc = document
      .querySelector('a[href*="action=logout;sesc="]')
      ?.href.match(/sesc=([a-f0-9]+)/)?.[1];

    if (!sc) return;

   for (let i = queue.length - 1; i >= 0; i--) {
      queue = GM_getValue("merit_queue", []);
     
      let item = queue[i];
      if (!item) continue;
       /* Prevent unnecessary network requests for known failed items */
      if (item.status === "failed") continue;

      // Evaluates precise minute accuracy instead of just the day
      if (item.date <= currentLocalTime) {
        console.log(
          `Time reached! Attempting to dispense ${item.amount} merit to MsgID ${item.msgId}...`,
        );

        const formData = new URLSearchParams({
          merits: item.amount,
          msgID: item.msgId,
          sc,
        });

        try {
          const response = await fetch(
            `https://bitcointalk.org/index.php?action=merit;msg=${item.msgId}`,
            {
              method: "POST",
              headers: {
                "Content-Type": "application/x-www-form-urlencoded",
                Accept:
                  "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8",
              },
              body: formData.toString(),
            },
          );

          if (response.ok) {
            const html = await response.text();

            if (html.includes("An Error Has Occurred")) {
              console.error(`Failed to send merit for MsgID ${item.msgId}`);
              let errorMsg = "Unknown error occurred.";

              const lowerHtml = html.toLowerCase();

              /** Checks for error
               * Note: not sure about the exact message for "no merit" yet, so I'm doing a contains check for "enough smerit" which should cover both "not enough sMerit" and "you don't have any sMerit" maybe
               * For any reason , if the error message doesn't match or there are changes in the future, it will default to "Unknown error occurred." instead of just saying "Failed to send merit" which is less informative for the user.
               * */

              if (lowerHtml.includes("enough smerit")) {
                errorMsg = "Not enough sMerit.";
              } else if (lowerHtml.includes("cannot send merit to yourself")) {
                errorMsg = "Cannot send merit to yourself tuff guy.";
              }

              /* Flags the failed item in the queue instead of deleting it */
              /** Flags and update  the failed item in the queue instead of deleting it */
              queue[i].status = "failed";
              queue[i].error = errorMsg;
              GM_setValue("merit_queue", queue);
           
            } else {
             
              console.log(
                `Successfully sent ${item.amount} merit for MsgID ${item.msgId}`,
              );
              // Remove by exact index mapping (faster than filter)
            queue.splice(i, 1);
            GM_setValue("merit_queue", queue);
            }
          }

          await new Promise((res) => setTimeout(res, 3000)); // wait to prevent rate-limiting before next attempt
        } catch (err) {
          console.error(
            "Error dispensing merit, keeping in queue:", err);
        }
      } else console.log("Time not Fufiiled yet...");
    }

  };

  processMeritQueue();
})();


Note :  By default, in the Post Trigger script, a queued post is set to receive 1 merit… In the No_Post_Trigger script, it is queued for 1 merit to be dispensed 24 hours later. Both settings can be adjusted to your preferred values directly from the “Merit Queue Settings" modal.

To change the default merit options in the dropdown:
Locate const predefinedMeritValues = [1, 2, 3, 4, 6, 8, 10, 20, 40, 50]; in the code and change it to your desire figures.


I wasn't sure if two threads would be better, so I am putting both scripts together in this single thread..

I will make it available on GitHub and GreasyFork soon ! ..

Any additional suggestions and critiques are always welcome.

*Disclaimer :

███████████████████████████
███████▄████████████▄██████
████████▄████████▄████████
███▀█████▀▄███▄▀█████▀███
█████▀█▀▄██▀▀▀██▄▀█▀█████
███████▄███████████▄███████
███████████████████████████
███████▀███████████▀███████
████▄██▄▀██▄▄▄██▀▄██▄████
████▄████▄▀███▀▄████▄████
██▄███▀▀█▀██████▀█▀███▄███
██▀█▀████████████████▀█▀███
███████████████████████████
.
.Duelbits PREDICT..
█████████████████████████
█████████████████████████
███████████▀▀░░░░▀▀██████
██████████░░▄████▄░░████
█████████░░████████░░████
█████████░░████████░░████
█████████▄▀██████▀▄████
████████▀▀░░░▀▀▀▀░░▄█████
██████▀░░░░██▄▄▄▄████████
████▀░░░░▄███████████████
█████▄▄█████████████████
█████████████████████████
█████████████████████████
.
.WHERE EVERYTHING IS A MARKET..
█████
██
██







██
██
██████
Will Bitcoin hit $200,000
before January 1st 2027?

    No @1.15         Yes @6.00    
█████
██
██







██
██
██████

  CHECK MORE > 
rat03gopoh
Legendary
*
Offline

Activity: 2688
Merit: 1026


NO KYC Exchanger☝️


View Profile WWW
May 30, 2026, 05:38:08 PM
 #2

Does the second script also work when the forum tab/browser app is closed, or even when the computer is turned off? Because that's essentially the point of the request: hiding the active status from the merit sending history.

 
 b1exch.to 
  ETH      DAI   
  BTC      LTC   
  USDT     XMR    
.███████████▄▀▄▀
█████████▄█▄▀
███████████
███████▄█▀
█▀█
▄▄▀░░██▄▄
▄▀██▄▀█████▄
██▄▀░▄██████
███████░█████
█░████░█████████
█░█░█░████░█████
█░█░█░██░█████
▀▀▀▄█▄████▀▀▀
TryNinja
Legendary
*
Offline

Activity: 3584
Merit: 10444


@ List of no-KYC websites: https://bitlist.co


View Profile WWW
May 30, 2026, 07:59:41 PM
Merited by vapourminer (2), promise444c5 (1)
 #3

Does the second script also work when the forum tab/browser app is closed, or even when the computer is turned off? Because that's essentially the point of the request: hiding the active status from the merit sending history.
And that's what the script does, as far as I understood. As soon as you make a post, basically revealing you're online, or after a fixed 24h period (to prevent someone keeping track of your online time through the day), it sends all the merits you saved to give out later.

Obviously it won't work when your computer is turned off. Tongue

 
 b1exch.to 
  ETH      DAI   
  BTC      LTC   
  USDT     XMR    
.███████████▄▀▄▀
█████████▄█▄▀
███████████
███████▄█▀
█▀█
▄▄▀░░██▄▄
▄▀██▄▀█████▄
██▄▀░▄██████
███████░█████
█░████░█████████
█░█░█░████░█████
█░█░█░██░█████
▀▀▀▄█▄████▀▀▀
hugeblack
Legendary
*
Offline

Activity: 3262
Merit: 4678



View Profile WWW
May 31, 2026, 07:23:15 AM
 #4

It is good and may be needed by who want to hide their Merits timeline with the timing of their posts. I will try it when I run out of sMerits quickly (Something that doesn't happen much lately Grin)

██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██



██
██
██
██
██
██
██



██
██
██
██
██



██
██

██
██
██
██
██
██
██
██
██
██
███████▄▄███████▄▄
████▄███████████████▄█████▄▄▄
██▄███████████████████▄▄██▀████▄▄▄▄▄▄▄▄███▄██████
▄███████████████████▀▄█████▄▄███████████▄▀▀▀██▄██
▄███▐███████████████▄▄▀███▀███▄█████████████▄███████
████▐██████████████████▀██▄▀██▐██▄▄▄▄██▀███▀▀███▀▀▀
█████████████████████▌▄▄▄██▐██▐██▀▀▀▀███████████
███████▌█████████▐██████▄▀██▄▀█████████████████████▄
▀██▐███▌█████████▐███▀████████▄██████████▀███████████
▀█▐█████████████████▀▀▀███▀██▀▀▀▀▀▀▀▀▀██▀▀▀███▀▀▀▀▀
██▀███████████████████▀▄██▀
████▀███████████████▀
███████▀▀███████▀▀
██
██


██
██
██
██
██
██
██
██
██

██
██
██


██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
 
    FAST    🔒 SECURE    🛡️ NO KYC        EXCHANGE NOW      
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██

██
██
██
██
██
██


██
██
██
██
██
██
██
██
██
██

██
██
██
██
██
██
██
██
██
██
██
*Ace*
Sr. Member
****
Offline

Activity: 434
Merit: 801



View Profile
May 31, 2026, 06:58:45 PM
Merited by vapourminer (2), promise444c5 (1)
 #5

It seems like a great tool to me, although I don’t think I actually need to use it.
But my question is, if we have to be online to send a Merit, how can this userscript send Merits even when we’re not logged in?
I really don’t understand this at all.

Well done on the project, of course

promise444c5 (OP)
Hero Member
*****
Offline

Activity: 1036
Merit: 868


All things are numbers


View Profile WWW
May 31, 2026, 08:25:00 PM
Merited by vapourminer (3), ABCbits (1), rat03gopoh (1)
 #6

Does the second script also work when the forum tab/browser app is closed, or even when the computer is turned off? Because that's essentially the point of the request: hiding the active status from the merit sending history.
Nope… You have to login anytime after the scheduled period.
The first script runs only when you post which already shows you’re active at that moment  Smiley

Here’s how it works: Assuming I’m using the second script.. I saw a nice post from you but I can’t merit it at the moment because I’m out of S-merit until after 24 hrs or I don’t want anyone to know I’m active until tomorrow and at the same time, I don’t want to forget that particular post for merit .

So what can I do? That’s where the script comes in, I can easily add it to a queue and then set a particular date and time  for it.

The following day, once i login and the time has elapsed already, it will automatically send the merit without having to look for it just to merit it.

I can do that for as many as possible posts.

** Although I’m still considering if I should limit the queue to around 20~30 post [maybe more] because if it fails to send merit when you’re out of smerit again, it will continue making the request in background everytime you reload the page. Or I can just add extra 24 hours for only out of Smerit 

It is good and may be needed by who want to hide their Merits timeline with the timing of their posts. I will try it when I run out of sMerits quickly (Something that doesn't happen much lately Grin)
Thanks .. I’m not sure if the current one I used will work anyway but I do need the message it shows when you’re out of Smerit.

But my question is, if we have to be online to send a Merit, how can this userscript send Merits even when we’re not logged in?
I really don’t understand this at all.
My script doesn’t send merit when you’re offline.. it’s only tied to your account and Bitcointalk server . I only grab token to make the request when the script needs to run and the user need to be logged in .. When you post or set a timer to merit a post it means you’re willing to indicate “ hello! I’m active and here’s your share of my smerit Smiley”.

When you’re not logged in the script will fail  because there’s no token to grab. Also the “queue” button won’t be visible because there’s no merit button.

███████████████████████████
███████▄████████████▄██████
████████▄████████▄████████
███▀█████▀▄███▄▀█████▀███
█████▀█▀▄██▀▀▀██▄▀█▀█████
███████▄███████████▄███████
███████████████████████████
███████▀███████████▀███████
████▄██▄▀██▄▄▄██▀▄██▄████
████▄████▄▀███▀▄████▄████
██▄███▀▀█▀██████▀█▀███▄███
██▀█▀████████████████▀█▀███
███████████████████████████
.
.Duelbits PREDICT..
█████████████████████████
█████████████████████████
███████████▀▀░░░░▀▀██████
██████████░░▄████▄░░████
█████████░░████████░░████
█████████░░████████░░████
█████████▄▀██████▀▄████
████████▀▀░░░▀▀▀▀░░▄█████
██████▀░░░░██▄▄▄▄████████
████▀░░░░▄███████████████
█████▄▄█████████████████
█████████████████████████
█████████████████████████
.
.WHERE EVERYTHING IS A MARKET..
█████
██
██







██
██
██████
Will Bitcoin hit $200,000
before January 1st 2027?

    No @1.15         Yes @6.00    
█████
██
██







██
██
██████

  CHECK MORE > 
vapourminer
Legendary
*
Offline

Activity: 5054
Merit: 6252


what is this "brake pedal" you speak of?


View Profile
June 01, 2026, 11:02:57 AM
Last edit: June 01, 2026, 01:52:22 PM by vapourminer
Merited by TryNinja (1), promise444c5 (1)
 #7

1st, thank you!!

2nd, sorry for being late to the thread lol

i will be testing soon

--------------

edit:

ok 1st test ran great, did a bunch of queue merits to some posts in this thread and a couple others, looks like they all fired when i posted in another thread im in.

i now have a merit minigun lol

using chrome for this testing as i dont want tampermonkey on my normal firefox atm

sweet

thanks again
LoyceV
Legendary
*
Offline

Activity: 4060
Merit: 21978


Thick-Skinned Gang Leader and Golden Feather 2021


View Profile WWW
June 01, 2026, 01:54:01 PM
 #8

ok 1st test ran great, did a bunch of queue merits to some posts in this thread and a couple others, looks like they all fired when i posted in another thread im in.
You sent your last Merit transactions twice with a 3 minute delay.

¡uʍop ǝpᴉsdn pɐǝɥ ɹnoʎ ɥʇᴉʍ ʎuunɟ ʞool no⅄
vapourminer
Legendary
*
Offline

Activity: 5054
Merit: 6252


what is this "brake pedal" you speak of?


View Profile
June 01, 2026, 01:55:45 PM
 #9

You sent your last Merit transactions twice with a 3 minute delay.

yeah just noticed. not sure what happened. i saw the singles merits went through then on refresh it was two.

queue shows empty
promise444c5 (OP)
Hero Member
*****
Offline

Activity: 1036
Merit: 868


All things are numbers


View Profile WWW
June 01, 2026, 02:03:52 PM
 #10

You sent your last Merit transactions twice with a 3 minute delay.

yeah just noticed. not sure what happened. i saw the singles merits went through then on refresh it was two.

queue shows empty
Which of the script did you use..

███████████████████████████
███████▄████████████▄██████
████████▄████████▄████████
███▀█████▀▄███▄▀█████▀███
█████▀█▀▄██▀▀▀██▄▀█▀█████
███████▄███████████▄███████
███████████████████████████
███████▀███████████▀███████
████▄██▄▀██▄▄▄██▀▄██▄████
████▄████▄▀███▀▄████▄████
██▄███▀▀█▀██████▀█▀███▄███
██▀█▀████████████████▀█▀███
███████████████████████████
.
.Duelbits PREDICT..
█████████████████████████
█████████████████████████
███████████▀▀░░░░▀▀██████
██████████░░▄████▄░░████
█████████░░████████░░████
█████████░░████████░░████
█████████▄▀██████▀▄████
████████▀▀░░░▀▀▀▀░░▄█████
██████▀░░░░██▄▄▄▄████████
████▀░░░░▄███████████████
█████▄▄█████████████████
█████████████████████████
█████████████████████████
.
.WHERE EVERYTHING IS A MARKET..
█████
██
██







██
██
██████
Will Bitcoin hit $200,000
before January 1st 2027?

    No @1.15         Yes @6.00    
█████
██
██







██
██
██████

  CHECK MORE > 
vapourminer
Legendary
*
Offline

Activity: 5054
Merit: 6252


what is this "brake pedal" you speak of?


View Profile
June 01, 2026, 02:11:22 PM
 #11

yeah just noticed. not sure what happened. i saw the singles merits went through then on refresh it was two.

queue shows empty
Which of the script did you use..

post_trigger so far


havent tested the non post one yet but i like it and will use it too. as i want to send merits without posting too as i go days sometimes between posts. id like to checkin queued merits more frequently, so im glad you have the two versions
promise444c5 (OP)
Hero Member
*****
Offline

Activity: 1036
Merit: 868


All things are numbers


View Profile WWW
June 01, 2026, 02:27:48 PM
Merited by vapourminer (1)
 #12

post_trigger so far


havent tested the non post one yet but i like it and will use it too. as i want to send merits without posting too as i go days sometimes between posts. id like to checkin queued merits more frequently, so im glad you have the two versions
Okay.. but the double-send is weird since you didn’t add any more post within the timeframe those merit entered..   the checks for each attempt is inside a loop , including the success filter..

I will check it though once I get back on my PC. But what exactly did you do within the period between   “ good bot”-post and the previous post edit?.

Edit.. just checked and it seems you deleted a post at 1:50 that triggered the resend which likely means the queue wasn’t empty .. still can’t explain but later

███████████████████████████
███████▄████████████▄██████
████████▄████████▄████████
███▀█████▀▄███▄▀█████▀███
█████▀█▀▄██▀▀▀██▄▀█▀█████
███████▄███████████▄███████
███████████████████████████
███████▀███████████▀███████
████▄██▄▀██▄▄▄██▀▄██▄████
████▄████▄▀███▀▄████▄████
██▄███▀▀█▀██████▀█▀███▄███
██▀█▀████████████████▀█▀███
███████████████████████████
.
.Duelbits PREDICT..
█████████████████████████
█████████████████████████
███████████▀▀░░░░▀▀██████
██████████░░▄████▄░░████
█████████░░████████░░████
█████████░░████████░░████
█████████▄▀██████▀▄████
████████▀▀░░░▀▀▀▀░░▄█████
██████▀░░░░██▄▄▄▄████████
████▀░░░░▄███████████████
█████▄▄█████████████████
█████████████████████████
█████████████████████████
.
.WHERE EVERYTHING IS A MARKET..
█████
██
██







██
██
██████
Will Bitcoin hit $200,000
before January 1st 2027?

    No @1.15         Yes @6.00    
█████
██
██







██
██
██████

  CHECK MORE > 
vapourminer
Legendary
*
Offline

Activity: 5054
Merit: 6252


what is this "brake pedal" you speak of?


View Profile
June 01, 2026, 05:22:45 PM
Merited by promise444c5 (1)
 #13

Edit.. just checked and it seems you deleted a post at 1:50 that triggered the resend which likely means the queue wasn’t empty .. still can’t explain but later

ah thats it i deleted a post to paste/merge it into my previous post in this thread

so i loaded my last post
copied the text
deleted the post
edited the prev post
paste the contents
hit post

that was in this thread

this test now included me queue meriting a couple post with different amounts, saved the queue, logging off, power cycle the machine, come back in, qmerit another post and now this post..

here goes.. (using post_trigger)

EDIT:

worked fine!
promise444c5 (OP)
Hero Member
*****
Offline

Activity: 1036
Merit: 868


All things are numbers


View Profile WWW
June 01, 2026, 07:41:44 PM
Merited by vapourminer (1)
 #14

Still don’t know how it happened   Tongue..
I will add this to my Todo: Check and save current number of Smerit whenever a User   “qmerit” (I like this much better than the plain”queue”- that will also come with the update  Grin) the first post no, checks for others.

When next the user post, it checks if the user Smerit is still same as the log Value before the attempt  , else it triggers a confirmation before sending including every other post in the queue[other posts in the queue won’t trigger any confirmation]..



The GitHub upload is still ongoing.. I just ran into some  access issue due to a recent attack.. hopefully it resolves so that anyone can contribute to the script.

As for the greasyfork, I don’t want to upload there yet without having it on GitHub.

███████████████████████████
███████▄████████████▄██████
████████▄████████▄████████
███▀█████▀▄███▄▀█████▀███
█████▀█▀▄██▀▀▀██▄▀█▀█████
███████▄███████████▄███████
███████████████████████████
███████▀███████████▀███████
████▄██▄▀██▄▄▄██▀▄██▄████
████▄████▄▀███▀▄████▄████
██▄███▀▀█▀██████▀█▀███▄███
██▀█▀████████████████▀█▀███
███████████████████████████
.
.Duelbits PREDICT..
█████████████████████████
█████████████████████████
███████████▀▀░░░░▀▀██████
██████████░░▄████▄░░████
█████████░░████████░░████
█████████░░████████░░████
█████████▄▀██████▀▄████
████████▀▀░░░▀▀▀▀░░▄█████
██████▀░░░░██▄▄▄▄████████
████▀░░░░▄███████████████
█████▄▄█████████████████
█████████████████████████
█████████████████████████
.
.WHERE EVERYTHING IS A MARKET..
█████
██
██







██
██
██████
Will Bitcoin hit $200,000
before January 1st 2027?

    No @1.15         Yes @6.00    
█████
██
██







██
██
██████

  CHECK MORE > 
rat03gopoh
Legendary
*
Offline

Activity: 2688
Merit: 1026


NO KYC Exchanger☝️


View Profile WWW
June 01, 2026, 11:34:40 PM
Merited by vapourminer (1), promise444c5 (1)
 #15

Allright, now I'm starting to understand. I had way too high expectations about hiding my online status. I think it would be nice if this tool also had a random 24-hour schedule generator or something. Some people may have "scheduled-time" tendencies that others can pick up on. If not, just consider this a default quick scheduling method.

 
 b1exch.to 
  ETH      DAI   
  BTC      LTC   
  USDT     XMR    
.███████████▄▀▄▀
█████████▄█▄▀
███████████
███████▄█▀
█▀█
▄▄▀░░██▄▄
▄▀██▄▀█████▄
██▄▀░▄██████
███████░█████
█░████░█████████
█░█░█░████░█████
█░█░█░██░█████
▀▀▀▄█▄████▀▀▀
vapourminer
Legendary
*
Offline

Activity: 5054
Merit: 6252


what is this "brake pedal" you speak of?


View Profile
June 01, 2026, 11:56:14 PM
Merited by promise444c5 (1)
 #16

no_post_trigger doesnt seem to be working the way i expect, it doesnt seem to ask for delay time?

gonna see what happens 24 hrs from now i do have posts time queued

will play more tomorrow

thanks again!

promise444c5 (OP)
Hero Member
*****
Offline

Activity: 1036
Merit: 868


All things are numbers


View Profile WWW
June 02, 2026, 12:17:55 AM
Last edit: June 02, 2026, 12:32:45 AM by promise444c5
Merited by vapourminer (1)
 #17

Allright, now I'm starting to understand. I had way too high expectations about hiding my online status. I think it would be nice if this tool also had a random 24-hour schedule generator or something. Some people may have "scheduled-time" tendencies that others can pick up on. If not, just consider this a default quick scheduling method.

no_post_trigger doesnt seem to be working the way i expect, it doesnt seem to ask for delay time?



My Apologies to both of you.. The implementation was there but my dmb a$$ agent removed the initial html block that includes it.. I can see why rato3gopoh was confused earlier.

to test it i booked both of you for 12:20am
All i have to do is reload by 12:20 or after..

[edit]
It worked.
I will update  the script..

Note: the script will only run when you visit a thread.. i can make it super but i don't want it to run for every page. The major point is that it delays the merit till when you want so it will definitely merit the post once you visit any thread after delay timeout.

███████████████████████████
███████▄████████████▄██████
████████▄████████▄████████
███▀█████▀▄███▄▀█████▀███
█████▀█▀▄██▀▀▀██▄▀█▀█████
███████▄███████████▄███████
███████████████████████████
███████▀███████████▀███████
████▄██▄▀██▄▄▄██▀▄██▄████
████▄████▄▀███▀▄████▄████
██▄███▀▀█▀██████▀█▀███▄███
██▀█▀████████████████▀█▀███
███████████████████████████
.
.Duelbits PREDICT..
█████████████████████████
█████████████████████████
███████████▀▀░░░░▀▀██████
██████████░░▄████▄░░████
█████████░░████████░░████
█████████░░████████░░████
█████████▄▀██████▀▄████
████████▀▀░░░▀▀▀▀░░▄█████
██████▀░░░░██▄▄▄▄████████
████▀░░░░▄███████████████
█████▄▄█████████████████
█████████████████████████
█████████████████████████
.
.WHERE EVERYTHING IS A MARKET..
█████
██
██







██
██
██████
Will Bitcoin hit $200,000
before January 1st 2027?

    No @1.15         Yes @6.00    
█████
██
██







██
██
██████

  CHECK MORE > 
LoyceV
Legendary
*
Offline

Activity: 4060
Merit: 21978


Thick-Skinned Gang Leader and Golden Feather 2021


View Profile WWW
June 02, 2026, 06:06:01 AM
Merited by vapourminer (2), promise444c5 (1)
 #18

I will add this to my Todo: Check and save current number of Smerit whenever a User   “qmerit”
~
When next the user post, it checks if the user Smerit is still same as the log Value before the attempt
For Merit sources, there are 2 separate sMerit "counters", and both change frequently. Did you include both?
Code:
You are a merit source. The next 135 merit you spend will come from your source rather than your sMerit balance.

¡uʍop ǝpᴉsdn pɐǝɥ ɹnoʎ ɥʇᴉʍ ʎuunɟ ʞool no⅄
*Ace*
Sr. Member
****
Offline

Activity: 434
Merit: 801



View Profile
June 02, 2026, 06:34:40 AM
 #19

But my question is, if we have to be online to send a Merit, how can this userscript send Merits even when we’re not logged in?
I really don’t understand this at all.
My script doesn’t send merit when you’re offline.. it’s only tied to your account and Bitcointalk server . I only grab token to make the request when the script needs to run and the user need to be logged in .. When you post or set a timer to merit a post it means you’re willing to indicate “ hello! I’m active and here’s your share of my smerit Smiley”.

When you’re not logged in the script will fail  because there’s no token to grab. Also the “queue” button won’t be visible because there’s no merit button.

OK, so I’d misunderstood.
I’d thought it worked even if the user wasn’t online.
Technically, it’s possible – or at least I think so – you just need a session cookie and a script that can run locally as well

promise444c5 (OP)
Hero Member
*****
Offline

Activity: 1036
Merit: 868


All things are numbers


View Profile WWW
June 02, 2026, 06:36:19 AM
Merited by vapourminer (1)
 #20

I will add this to my Todo: Check and save current number of Smerit whenever a User   “qmerit”
~
When next the user post, it checks if the user Smerit is still same as the log Value before the attempt
For Merit sources, there are 2 separate sMerit "counters", and both change frequently. Did you include both?
Code:
You are a merit source. The next 135 merit you spend will come from your source rather than your sMerit balance.
Not yet, I only added it to my todo.. but this changes things a bit.

I was even thinking of a much better way I.e grab the merit history html page and check if any of the merited posts has the first item “msgId” in the queue. That way I can easily pop confirmation even if the user wish to send merit to that particular post once again which could happen in some cases when it’s added as the first item but the major check will be to rule out  unattempted double-spending .

███████████████████████████
███████▄████████████▄██████
████████▄████████▄████████
███▀█████▀▄███▄▀█████▀███
█████▀█▀▄██▀▀▀██▄▀█▀█████
███████▄███████████▄███████
███████████████████████████
███████▀███████████▀███████
████▄██▄▀██▄▄▄██▀▄██▄████
████▄████▄▀███▀▄████▄████
██▄███▀▀█▀██████▀█▀███▄███
██▀█▀████████████████▀█▀███
███████████████████████████
.
.Duelbits PREDICT..
█████████████████████████
█████████████████████████
███████████▀▀░░░░▀▀██████
██████████░░▄████▄░░████
█████████░░████████░░████
█████████░░████████░░████
█████████▄▀██████▀▄████
████████▀▀░░░▀▀▀▀░░▄█████
██████▀░░░░██▄▄▄▄████████
████▀░░░░▄███████████████
█████▄▄█████████████████
█████████████████████████
█████████████████████████
.
.WHERE EVERYTHING IS A MARKET..
█████
██
██







██
██
██████
Will Bitcoin hit $200,000
before January 1st 2027?

    No @1.15         Yes @6.00    
█████
██
██







██
██
██████

  CHECK MORE > 
Pages: [1] 2 »  All
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!