This site is developed to XHTML and CSS2 W3C standards. If you see this paragraph, your browser does not support those standards and you need to upgrade. Visit WaSP for a variety of options.

php pastebin - collaborative irc debugging view php source

Paste #602

Posted by: BitByByte
Posted on: 2026-02-24 17:11:09
Age: 9 hrs ago
Views: 4
// ==UserScript==
// @name         KamTape Downloader
// @namespace    kamtape
// @version      6.0
// @match        https://www.kamtape.com/watch?v=*
// @grant        none
// @run-at       document-end
// ==/UserScript==

(function() {
    'use strict';

    function insertButton() {

        const videoId = new URLSearchParams(window.location.search).get("v");
        if (!videoId) return;

        if (document.getElementById("kamtape-download-row")) return;

        const firstActionsDiv = document.querySelector("#actionsAndStatsDiv .actionsDiv");
        if (!firstActionsDiv) return;

        const actionRow = document.createElement("div");
        actionRow.className = "actionRow";
        actionRow.id = "kamtape-download-row";
        actionRow.style.marginTop = "10px";

        const button = document.createElement("button");
        button.type = "button";
        button.textContent = "Download Video";

        button.addEventListener("click", function() {
            const h1 = document.querySelector("h1");
            let filename = h1 ? h1.textContent.trim() : "video";
            filename = filename.replace(/[\/\\?%*:|"<>]/g, "_") + ".webm";

            const link = document.createElement("a");
            link.href = "https://www.kamtape.com/get_video.php?video_id=" + videoId + "&webm=1";
            link.download = filename;
            document.body.appendChild(link);
            link.click();
            document.body.removeChild(link);
        });

        actionRow.appendChild(button);
        firstActionsDiv.appendChild(actionRow);
    }

    insertButton();
    setTimeout(insertButton, 500);

})();

Download raw | Create new paste

© BitByByte, 2026.
Downgrade Counter