Search code examples
javascriptpastebin

Set a pastebin as a javascript variable


I have a variable in a pastebin file and i was wondering if i could get my java script to use it? Pastebin

I thought maybe:

<script src="http://pastebin.com/raw.php?i=j2Rm33fS"></script>

But its a php file and for some reason when i reason when i try to display this it displays as [Object] or just nothing.

I even tried removing the variables and making them only available in the pastebin but then none of the variables showed...


Solution

  • The following code snippet works fine for me.

    But, the fact is the Content-Type of the URL http://pastebin.com/raw.php?i=j2Rm33fS is plain/text. Some browser may ignore it for security reason.

    alert(Dump);
    <script src="http://pastebin.com/raw.php?i=j2Rm33fS"></script>