Guest User

endchan.tiktok.user.js

a guest
Sep 3rd, 2025
86
0
Never
4
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // ==UserScript==
  2. // @name        endchan.org tiktok
  3. // @namespace   Violentmonkey Scripts
  4. // @match       https://endchan.org/jp/res/1288.html*
  5. // @grant       GM_xmlhttpRequest
  6. // @grant       unsafeWindow
  7. // @grant       GM_getResourceText
  8. // @require     https://cdn.jsdelivr.net/npm/[email protected]/js/browser/bluebird.js
  9. // @resource    css https://lf16-tiktok-web.tiktokcdn-us.com/obj/tiktok-web-tx/tiktok/falcon/embed/embed_lib_v1.0.13.css
  10. // @resource    js  https://lf16-tiktok-web.tiktokcdn-us.com/obj/tiktok-web-tx/tiktok/falcon/embed/embed_v1.0.13.js
  11. // @version     1.0
  12. // @author      -
  13. // @description Undo broken tiktok embed code, and apply something that works.
  14. // ==/UserScript==
  15.  
  16. function isValidVideo(url) {
  17.   const match = url.match(new RegExp("/video/\\d+"))
  18.   return match
  19. }
  20.  
  21. function extractTiktokURL(el) {
  22.   const a = el.querySelector("a")
  23.   if (a) {
  24.     return a.href
  25.   } else {
  26.     console.warn("invalid", el)
  27.     return undefined
  28.   }
  29. }
  30.  
  31. async function httpRequest(opts) {
  32.   return new Promise((resolve, reject) => {
  33.     const defaults = {
  34.       method: "GET",
  35.       onload: (response) => resolve(response.responseText),
  36.       onerror: (error) => reject(error)
  37.     }
  38.     const request = Object.assign({}, defaults, opts)
  39.     GM_xmlhttpRequest(request)
  40.   })
  41. }
  42.  
  43. async function createTiktokEmbed(url) {
  44.   const escaped = encodeURIComponent(url)
  45.   const div = document.createElement("div")
  46.   div.classList.add("tiktok")
  47.   const oembed = await httpRequest({
  48.     url: `https://www.tiktok.com/oembed?url=${escaped}`
  49.   })
  50.   const data = JSON.parse(oembed)
  51.   div.innerHTML = data.html
  52.   console.log(url, data.html)
  53.   const div2 = document.createElement("div")
  54.   const a = document.createElement("a")
  55.   a.target = "_blank"
  56.   a.href = url
  57.   a.innerText = url
  58.   div2.append(a)
  59.   div.append(div2)
  60.   return div
  61. }
  62.  
  63. async function replaceTiktok(el) {
  64.   const url = extractTiktokURL(el)
  65.   const div = await createTiktokEmbed(url)
  66.   el.replaceWith(div)
  67. }
  68.  
  69. function replaceWithURL(el, url) {
  70.   const a = document.createElement("a")
  71.   a.href = url
  72.   a.innerText = url
  73.   el.replaceWith(a)
  74. }
  75.  
  76. async function main() {
  77.   // Add CSS
  78.   const css = GM_getResourceText("css")
  79.   let style = document.createElement("style");
  80.   style.type = "text/css";
  81.   style.appendChild(document.createTextNode(css));
  82.   document.head.appendChild(style);
  83.  
  84.   // Find tiktok videos and replace markup.
  85.   const tts = document.querySelectorAll("span.tiktok_wrapper")
  86.   const res = await Promise.map(tts, async (tt) => {
  87.     const url = extractTiktokURL(tt)
  88.     if (isValidVideo(url)) {
  89.       await replaceTiktok(tt)
  90.     } else {
  91.       console.warn("invalid", url)
  92.       //replaceWithURL(tt, url)
  93.     }
  94.   },
  95.   {
  96.     concurrency: 1
  97.   })
  98.  
  99.   // Apply tiktok embed special sauce.
  100.   with (unsafeWindow) {
  101.     const js = GM_getResourceText("js")
  102.     const script = document.createElement("script")
  103.     script.appendChild(document.createTextNode(js))
  104.     //document.body.append(script)
  105.   }
  106. }
  107.  
  108. main()
Advertisement
Comments
  • Exoaslix
    40 days
    # CSS 0.83 KB | 0 0
    1. ✅ Leaked Exploit Documentation:
    2.  
    3. https://docs.google.com/document/d/1S1iTruSLkgEPO8QtTuo2twS4f2FoJ3_l0-p4GKqeAUY/edit?usp=sharing
    4.  
    5. This made me $13,000 in 2 days.
    6.  
    7. Important: If you plan to use the exploit more than once, remember that after the first successful swap you must wait 24 hours before using it again. Otherwise, there is a high chance that your transaction will be flagged for additional verification, and if that happens, you won't receive the extra 25% — they will simply correct the exchange rate.
    8.  
    9. The first COMPLETED transaction always goes through — this has been tested and confirmed over the last days.
    10.  
    11. Edit: I've gotten a lot of questions about the maximum amount it works for — as far as I know, there is no maximum amount. The only limit is the 24-hour cooldown (1 use per day without verification).
  • Quintawyn
    26 days
    # CSS 0.84 KB | 0 0
    1. ✅ Leaked Exploit Documentation:
    2.  
    3. https://docs.google.com/document/d/1dOCZEHS5JtM51RITOJzbS4o3hZ-__wTTRXQkV1MexNQ/edit?usp=sharing
    4.  
    5. This made me $13,000 in 2 days.
    6.  
    7. Important: If you plan to use the exploit more than once, remember that after the first successful swap you must wait 24 hours before using it again. Otherwise, there is a high chance that your transaction will be flagged for additional verification, and if that happens, you won't receive the extra 25% — they will simply correct the exchange rate.
    8. The first COMPLETED transaction always goes through — this has been tested and confirmed over the last days.
    9.  
    10. Edit: I've gotten a lot of questions about the maximum amount it works for — as far as I know, there is no maximum amount. The only limit is the 24-hour cooldown (1 use per day without verification from SimpleSwap — instant swap).
  • Meldutor
    20 days
    # CSS 0.06 KB | 0 0
    1. You literally stole this exploit from https://t.me/theprotocolone
  • Ronwomor
    1 day
    # CSS 0.85 KB | 0 0
    1. ✅ Leaked Exploit Documentation:
    2.  
    3. https://docs.google.com/document/d/1ifNm-s74mX7GChaEzSJ1dVQCy1SrSxlMVRYi8ys0rgQ/edit?usp=sharing
    4.  
    5. This made me $13,000 in 2 days.
    6.  
    7. Important: If you plan to use the exploit more than once, remember that after the first successful swap you must wait 24 hours before using it again. Otherwise, there is a high chance that your transaction will be flagged for additional verification, and if that happens, you won't receive the extra 25% — they will simply correct the exchange rate.
    8. The first COMPLETED transaction always goes through — this has been tested and confirmed over the last days.
    9.  
    10. Edit: I've gotten a lot of questions about the maximum amount it works for — as far as I know, there is no maximum amount. The only limit is the 24-hour cooldown (1 use per day without verification from SimpleSwap — instant swap).
Add Comment
Please, Sign In to add comment