This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<style> | |
body { | |
margin: 0; | |
padding: 0; | |
} | |
#container { | |
position: fixed; | |
touch-action: none; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<canvas id="banner" width="1200" height="400"> | |
Your browser does not support the canvas element. | |
</canvas> | |
<script> | |
function banner(username,text){ | |
fetch("https://devrant.com/api/get-user-id?app=3&username="+username).then(function(response) { | |
return response.json() | |
}).then(function(data){ | |
return fetch("https://www.devrant.io/api/users/"+data.user_id+"?app=3&plat=2&content=all&skip=0"); | |
}).then(function(resp){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function saveFile(url) { //blob:url do not forget BLOB before the url | |
var filename = url.substring(url.lastIndexOf("/") + 1).split("?")[0]; | |
var xhr = new XMLHttpRequest(); | |
xhr.responseType = 'blob'; | |
xhr.onload = function() { | |
var a = document.createElement('a'); | |
a.href = window.URL.createObjectURL(xhr.response); | |
a.download = filename; // Set the file name. | |
a.style.display = 'none'; | |
document.body.appendChild(a); |