Better site

  • sfsjunior
    3rd Aug 2014 Member 0 Permalink

    Hello, powder toy people!

    I'm an multi-platform developer (includes web developing) and i have experience in making sites. I think you can update the powdertoy.uk threads to use AJAX to auto-update. Why? Because i leave it open to answer people asking about my mod (and, futurely, mods) and sometimes a lot off questions and suggestions appear and i don't see. 

    Thanks always! Bye people!

    (sorry if the post is so useless... Please don't ban me for this :))

  • boxmein
    3rd Aug 2014 Former Staff 1 Permalink
    Heya, no developer can change this, as the site is solely owned by Simon.
    However, look at the Javascript that gets triggered when a new page is opened (it already uses AJAX!), it can tell you what you ought to do to make an user-script behaving similar to what you want.
    $(".Pagination a").live('click', function(){
    if(!window.history.pushState){
    return true;
    }
    goBack = 0;
    Link2 = this.href;
    Link = this.href.replace(/\.html\?/, ".json?Mode=HTML&");
    $("#ActionSpinner").fadeIn("fast");
    $("ul.MessageList").fadeTo(200, 0.7);
    $.get(Link, function(data){
    $("#ActionSpinner").fadeOut("fast");
    $(".Pagination").html(data.Pagination);
    OLHeight = $('ul.MessageList').height();
    $("ul.MessageList").children().addClass("QueueRemove");
    if(goBack){
    $("ul.MessageList").prepend(data.Posts);
    } else {
    $("ul.MessageList").append(data.Posts);
    OLHeight = (-OLHeight);
    }
    ProcessMessages();
    $("ul.MessageList").fadeTo(500, 1);
    $("ul.MessageList").animate({
    top: OLHeight
    }, 500, function() {
    $("ul.MessageList").css({"top": 0});
    $("ul.MessageList").children(".QueueRemove").remove();
    });
    LoadForumBlocks();
    if(window.history.pushState){
    window.history.pushState("", "", Link2);
    }/* else {
    window.location.hash = "#PageNum="+data.PageNum;
    }*/

    }, "json");
    return false;
    });
    Edited once by boxmein. Last: 3rd Aug 2014