Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ==UserScript==
- // @name PrtScShow2ch
- // @namespace 2ch
- // @author Anonymous
- // @license MIT
- // @version 0.1
- // @include http*://caschbox.com/*
- // ==/UserScript==
- 'use strcit';
- document.onclick = e => {
- if (!e.target.classList.contains('btn-danger'))
- return;
- let alertInfo = document.querySelector('#log');
- let url = alertInfo.textContent.split(': ')[1];
- fetch(`https://cors-anywhere.herokuapp.com/${url}`).then(res => {
- return res.text();
- }).then(text => {
- let lol = text.match(/class="no-click screenshot-image" src="(.*?)"/)
- alertInfo.innerHTML = `
- <div class="row justify-content-center">
- <div class="col-auto">
- <img src="${lol[1]}" style="max-width: 1050px;">
- </div>
- </div>`
- }).catch(err => {
- ;
- });
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement