Guest User

Untitled

a guest
Nov 21st, 2020
78
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //open http://gosms.gomocdn.com/mms/v14/index.html
  2. //paste to console:
  3.  
  4. const tourl = x => `https://gs.3g.cn/D/${x.toString(16)}/w`;
  5. const parseFile = url =>
  6.     url.split('=')[1].split('&')[0].replaceAll('%2F', '/').replaceAll('%3A', ':');
  7.  
  8. let start = 1405742, ppage = 9;
  9.  
  10. const iframe = src => `<iframe src="${src}" style='height: 400px;'></iframe>`;
  11. const html = `
  12.     <style>body{background: #000; overflow: scroll; font-size: 16px;} nav {width: 100%;display: flex;position: fixed;left: 0;background: #000;padding: 20px;} nav .panel {margin: auto;color: red;display: flex;color: red;}nav .panel button {background: red;border: none;margin-right: 5px;}nav .panel * {font-family: monospace;}nav .panel input {background: #000;border: 1px solid red;width: 80px;color: red;margin-right: 10px;} </style>
  13.    
  14.     <nav>
  15.     <div class="panel">
  16.     <label for="ppage">files per page:
  17.         <input type="text" id="ppage" value='9'/>
  18.     </label>
  19.     <label for="start">start id:
  20.         <input type="text" id="start" value='1405742'/>
  21.     </label>
  22.     <button onclick="rem();go(false)">back</button>
  23.     <button onclick="rem();go()">next</button>
  24.     </div>
  25.     </nav>
  26.  
  27.     <div id='box'></div>
  28.     `;
  29.  
  30. document.body.innerHTML = html;
  31. const box = document.querySelector('#box'),
  32.       ppageEl = document.getElementById('ppage'),
  33.       startEl = document.getElementById('start');
  34.  
  35. const reset = () => {
  36.     console.log(ppage, start)
  37.     ppage = parseInt(ppageEl.value);
  38.     start = parseInt(startEl.value);
  39. }
  40.  
  41. const rem = () => box.innerHTML = '';
  42. const go = (to = true) => {
  43.     reset();
  44.     start += to ? ppage : -ppage;
  45.     startEl.value = start;
  46.     const urls = Array(ppage).fill(start).map((i, j) => i + j).map(x => tourl(x));
  47.     box.innerHTML = urls.map(u => iframe(u)).join('\n');
  48. }
  49.  
  50. go();
RAW Paste Data