MediaWiki:Common.js: Revizyonlar arasındaki fark
Gezinti kısmına atla
Arama kısmına atla
Değişiklik özeti yok |
Değişiklik özeti yok |
||
| 1. satır: | 1. satır: | ||
sonuc= parseInt($(".GKSskorlar").attr("skorGKS1"))+parseInt($(".GKSskorlar").attr("skorGKS2"))+parseInt($(".GKSskorlar").attr("skorGKS3")); | function addLink() { | ||
var body_element = document.getElementsByTagName('body')[0]; | |||
var selection; | |||
selection = window.getSelection(); | |||
var pagelink = "<br/> <br/> Kaynak: <a href='"+document.location.href+"'>"+decodeURI(document.location.href)+"</a><br/> "; if(selection.toString().length>150) | |||
{ | |||
var copytext = selection + pagelink; | |||
var newdiv = document.createElement('div'); | |||
newdiv.style.position='absolute'; | |||
newdiv.style.left='-99999px'; | |||
body_element.appendChild(newdiv); | |||
newdiv.innerHTML = copytext; | |||
selection.selectAllChildren(newdiv); | |||
window.setTimeout(function() { | |||
body_element.removeChild(newdiv); | |||
},0); | |||
} | |||
} | |||
document.oncopy = addLink; var ozelGunMsj="Gazi Mustafa Kemal Atatürk ve tüm Mehmetçiklerimizi rahmet ve minnetle anıyoruz. "; | |||
$("#content").prepend(" | |||
<div style="\22 background-color:firebrick;"><img width=\"25%\" src=\"../atavebayrak.png\">"+ozelGunMsj+"</div> | |||
"); | |||
$(".GKSsec").on("click",function(){ | |||
var deger=$(this).attr("bolum"); | |||
var puan=$(this).attr("skor"); | |||
var girdi="skor"+deger; | |||
$(".GKSskorlar").attr(girdi,puan); | |||
sonuc= parseInt($(".GKSskorlar").attr("skorGKS1"))+parseInt($(".GKSskorlar").attr("skorGKS2"))+parseInt($(".GKSskorlar").attr("skorGKS3")); | |||
console.log(sonuc); | |||
$("#GKSsonuc").html(sonuc); | |||
}); | |||
21.53, 17 Mart 2020 tarihindeki hâli
function addLink() {
var body_element = document.getElementsByTagName('body')[0];
var selection;
selection = window.getSelection();
var pagelink = "<br/> <br/> Kaynak: <a href='"+document.location.href+"'>"+decodeURI(document.location.href)+"</a><br/> "; if(selection.toString().length>150)
{
var copytext = selection + pagelink;
var newdiv = document.createElement('div');
newdiv.style.position='absolute';
newdiv.style.left='-99999px';
body_element.appendChild(newdiv);
newdiv.innerHTML = copytext;
selection.selectAllChildren(newdiv);
window.setTimeout(function() {
body_element.removeChild(newdiv);
},0);
}
}
document.oncopy = addLink; var ozelGunMsj="Gazi Mustafa Kemal Atatürk ve tüm Mehmetçiklerimizi rahmet ve minnetle anıyoruz. ";
$("#content").prepend("
<div style="\22 background-color:firebrick;"><img width=\"25%\" src=\"../atavebayrak.png\">"+ozelGunMsj+"</div>
");
$(".GKSsec").on("click",function(){
var deger=$(this).attr("bolum");
var puan=$(this).attr("skor");
var girdi="skor"+deger;
$(".GKSskorlar").attr(girdi,puan);
sonuc= parseInt($(".GKSskorlar").attr("skorGKS1"))+parseInt($(".GKSskorlar").attr("skorGKS2"))+parseInt($(".GKSskorlar").attr("skorGKS3"));
console.log(sonuc);
$("#GKSsonuc").html(sonuc);
});