Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * show Credits on User-Page
- * */
- function appendCredits() {
- var creditsURL = new String(baseURL + "/credits/");
- //read credits using ajax
- $.ajax({
- url: creditsURL,
- success: function(data){
- //get dom of credits
- var credits = $(data).find("#munzee-holder");
- var creditsHtml = $(credits).html();
- //some replacements
- creditsHtml = creditsHtml.replaceAll("col-lg-2","col-lg-1");
- creditsHtml = creditsHtml.replaceAll("<h3",'<div style="width: 42px; padding-top: 5px; text-align: center; font-size: 12px; font-weight: bold;"');
- creditsHtml = creditsHtml.replaceAll("</h3","</div");
- creditsHtml = '<ul class="list-inline tooltip-holder text-center">' + creditsHtml + '</ul>';
- creditsHtml = '<div class="clearfix"></div> <div id="myCredits" class="panel-heading" style="margin: 15px; background-color: #333333;">Credits for ' + logonUsername + '</div><div style="margin: 30px;">' + creditsHtml + '</div>';
- creditsHtml = creditsHtml.replaceAll( '<img ', '<img style="max-width: 42px; max-height: 42px;"' );
- //append credits in new container
- $($(".col-md-12")[2]).append( creditsHtml ).change();
- }
- }); //$.ajax
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement