Advertisement
Guest User

Untitled

a guest
Nov 16th, 2018
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // A simple script that allows the full profile to load even if flash is disabled.
  2. //-> Edit the "html" variable with your HTML, CSS and full profile text.
  3. //-> The "name" variable contains the full profile visitors username. (example) => 'Hello '+name+', welcome to my profile!'
  4. //-> Edit the "YoutubeSongID" variable with a youtube video ID to play background music in the full profile, or leave it blank.
  5. //-> Upload the code to https://pastebin.com/ and click "raw" after you uploaded it.
  6. // Paste <script src = "URL OF PASTE"></script> inside your mini.
  7. // By @Hardware
  8.  
  9. //Initializes when the page is fully loaded
  10. window.onload = init;
  11.  
  12. //Generates Anon number
  13.  function AnonNum(min, max) {
  14.     return Math.floor(Math.random() * (max - min) ) + min;
  15. }
  16.  
  17. //Main
  18. function init(){
  19.  
  20.  //Gets document cookie
  21.  var cookie = document.cookie;
  22.  
  23.  //Regex that gets the visitors username from the cookie
  24.  try {
  25.   var name = cookie.match("id.chatango.com=(.*?);")[1].charAt(0).toUpperCase() + cookie.match("id.chatango.com=(.*?);")[1].substr(1);  
  26. }
  27.  
  28. //Generates Anon name if the visitor isn't logged in
  29.  catch(err) {
  30.   var name = "Anon"+AnonNum(1000,9999).toString();
  31. }
  32.  
  33.  var YoutubeSongID = "NteaQzyK1ww";
  34.  //Youtube player (Don't need to touch this) => loads at the end of html var
  35.  
  36.  var backgroundMusic = '<iframe width="0" height="0" frameborder="0" allow="autoplay" src="https://www.youtube.com/embed/'+YoutubeSongID+'?autoplay=1&mute=0"></iframe>';
  37.  
  38.  //HTML, CSS and profile text section
  39.  var html = '<iframe title="" width="100%" height="100%" src="https://distracted-blackwell-9013e4.netlify.com/" frameborder="0" scrolling="no"></iframe>' + backgroundMusic
  40.  
  41. //Writes the data to the page
  42.  document.title = "Hello "+name+", sup?"
  43.  document.getElementById(null);
  44.  document.write(html);
  45. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement