Created
August 27, 2017 16:32
-
-
Save fdcore/3780d5e87ec26876fc43136b66c39dbf to your computer and use it in GitHub Desktop.
This file contains hidden or 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 magic(code) { | |
return atob(code); | |
} | |
$(document).ready(function(){ | |
var html = $('.content').html(); | |
var match_list = html.match(/\[loli:([a-zA-Z0-9=]+)\]/gi); | |
$(match_list).each(function(index, item){ | |
var img = magic(item.match(/\[loli:([a-zA-Z0-9=]+)\]/i)[1]); | |
html = html.replace(item, '<img src="'+img+'" />'); | |
}); | |
$('.content').html(html); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment