「MediaWiki:Common.js」の版間の差分

編集の要約なし
編集の要約なし
タグ: 差し戻し済み
編集の要約なし
タグ: 手動差し戻し 差し戻し済み
1行目: 1行目:
/* ここにあるすべてのJavaScriptは、すべてのページ読み込みですべての利用者に対して読み込まれます */
/* ここにあるすべてのJavaScriptは、すべてのページ読み込みですべての利用者に対して読み込まれます */
$(document).ready(function() {
$(document).ready(function() {
     // フッターの存在を確認してから広告スクリプトを追加
     var adHtml = '<div id="footer-ad" style="text-align: center; margin-top: 20px;">' +
    if ($('#footer').length) {
                '<a href="https://your-ad-link.example.com" target="_blank">' +
        $.getScript("https://adm.shinobi.jp/s/e5693d186bd4b5059686530409d0aec1")
                '<img src="https://your-ad-image.example.com/banner.jpg" alt="広告" style="width:300px; height:auto;">' +
        .done(function() {
                '</a></div>';
            console.log("Ad script loaded successfully.");
      
        })
    $('#footer').append(adHtml);
        .fail(function(jqxhr, settings, exception) {
            console.error("Failed to load ad script:", exception);
        });
     } else {
        console.error("Footer element not found.");
    }
});
});