Pengguna:Kenrick95/Reference Tooltips.js: Perbedaan antara revisi

Konten dihapus Konten ditambahkan
Kenrick95 (bicara | kontrib)
Tidak ada ringkasan suntingan
k Maintenance: jquery.cookie has been deprecated phab:T271995
 
(3 revisi perantara oleh 2 pengguna tidak ditampilkan)
Baris 7:
if ( wgCanonicalNamespace === '' || wgCanonicalNamespace === 'Project' || wgCanonicalNamespace === 'Help' ) {
function toggleRT(o){
mw.loader.using("jquerymediawiki.cookie",function(){
$mw.cookie.set("RTsettings",o+"|"+ settings[1] + "|" + settings[2], {path:"/",expires:90});
location.reload();
})
Baris 55:
} else {
settingsMenu = $("<form>").append(
$("<button>").css("width","100%").text("Nonaktifkan ''Reference Tooltips''").button().click(function(){toggleRT(0)}),
"<br>",
$("<small>").text("Ketika dinonaktifkan, Reference Tooltips dapat diaktifkan kembali menggunakan pranala di bawahan halaman."),
Baris 64:
$("<label>").append(
$("<input>").attr({"type":"radio", "name":"RTActivate", "checked":settings[2]==0&&"checked", "disabled":"ontouchstart" in document.documentElement&&"disabled"}),
"hoveringmeng-<i>hover</i>"
),
$("<label>").append(
$("<input>").attr({"type":"radio", "name":"RTActivate", "checked":settings[2]==1&&"checked"}),
"clickingmengeklik"
)
).submit(function(e){e.preventDefault()}).dialog({modal:true,width:500,title:"Opsi <i>Reference Tooltips</i>",buttons:{"Simpan setelan":function(){
var a = this.getElementsByTagName("input"),
b = +a[0].value;
$mw.cookie.set("RTsettings","1|"+ (b > -1 && b < 5001 ? b : settings[1]) + (a[1].checked ? "|0" : "|1"), {path:"/",expires:90});
location.reload();
}}});
Baris 116:
} catch (e) { mw.log(e) }
c.removeChild( c.firstChild );
$( tooltipNode.firstChild.insertBefore( document.createElement( "span" ), tooltipNode.firstChild.firstChild ) ).addClass("RTsettings").attr("title", "Setelan <i>Tooltip</i>").click(function(){
mw.loader.using(["jquerymediawiki.cookie","jquery.ui.dialog"], openSettingsMenu);
})
tooltipNode.appendChild( document.createElement( "li" ) );