LLWiki正在建设中,欢迎加入我们

“User:Bhsd/widget/list.js”的版本间差异

来自LLWiki
跳转到导航 跳转到搜索
第1行: 第1行:
// 代码迁移自[https://github.com/bhsd-harry/list]
// 代码迁移自[https://github.com/bhsd-harry/list]
function main($) {
function main($) {
$.getJSON('/zh?title=user:bhsd/list.json&action=raw&ctype=application/json', function(str) {
$('.widget-test').html('<a href="/zh/User:Bhsd/list.js" title="User:Bhsd/list.js">User:Bhsd/list.js</a>成功加载!');
var data = JSON.parse(str);
$('.widget-test').html('<a href="/zh/User:Bhsd/list.js" title="User:Bhsd/list.js">User:Bhsd/list.js</a>' +
data.test ? '' : '由于JSON未' +
'成功加载!');
});
}
}


var jqueryTimer = setInterval(function() {
var jqueryTimer = setInterval(function() {
if(window.jQuery) {
if(window.jQuery) {
clearInterval(jqueryTimer);
clearInterval(jqueryTimer);
main(jQuery);
main(jQuery);
}
}
}, 100);
}, 100);

2020年10月21日 (三) 23:44的版本

// 代码迁移自[https://github.com/bhsd-harry/list]
function main($) {
    $.getJSON('/zh?title=user:bhsd/list.json&action=raw&ctype=application/json', function(str) {
        var data = JSON.parse(str);
        $('.widget-test').html('<a href="/zh/User:Bhsd/list.js" title="User:Bhsd/list.js">User:Bhsd/list.js</a>' +
            data.test ? '' : '由于JSON未' +
            '成功加载!');
    });
}

var jqueryTimer = setInterval(function() {
    if(window.jQuery) {
        clearInterval(jqueryTimer);
        main(jQuery);
    }
}, 100);