Reserve 2

予約したのが自分ではない場合

<head>
<style>
iframe {border: none;}
</style>
</head>
<body>
<iframe src="http://pseudo-scp-jp.wdfiles.com/local--code/template:reserve/1" style="width: 100%; height: 80px;" id="AlertIframe"></iframe>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
<script>
$(function(){
    var wikidotId = $(location).attr('hash').substr(1);
        if (wikidotId == 'hogehoge') {$('#AlertIframe').css('display','none');}
        else {var reserver = 'hogehoge';}
    $('#AlertIframe').on('load', function(){
        $('#AlertIframe').contents().find('pre').css('display','none');
        $('#AlertIframe').contents().find('#userName').html(reserver);
    });
});
</script>
</body>

予約したのが自分(hogehoge)の場合

<head>
<style>
iframe {border: none;}
</style>
</head>
<body>
<iframe src="http://pseudo-scp-jp.wdfiles.com/local--code/template:reserve/1" style="width: 100%; height: 80px;" id="AlertIframe"></iframe>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
<script>
$(function(){
    var wikidotId = $(location).attr('hash').substr(1);
        if (wikidotId == 'hogehoge') {$('#AlertIframe').css('display','none');}
        else {var reserver = 'hogehoge';}
    $('#AlertIframe').on('load', function(){
        $('#AlertIframe').contents().find('pre').css('display','none');
        $('#AlertIframe').contents().find('#userName').html(reserver);
    });
});
</script>
</body>

そもそも予約が無い場合

<head>
<style>
iframe {border: none;}
</style>
</head>
<body>
<iframe src="http://pseudo-scp-jp.wdfiles.com/local--code/XXXXXXX/1" style="width: 100%; height: 80px;" id="AlertIframe"></iframe>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
<script>
$(function(){
    var wikidotId = $(location).attr('hash').substr(1);
        if (wikidotId == 'hogehoge') {$('#AlertIframe').css('display','none');}
        else {var reserver = 'hogehoge';}
    $('#AlertIframe').on('load', function(){
        $('#AlertIframe').contents().find('pre').css('display','none');
        $('#AlertIframe').contents().find('#userName').html(reserver);
    });
});
</script>
</body>
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License