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: | ||
<div class="mw-parser-output"><p>function addLink() { | |||
</p><p>var body_element = document.getElementsByTagName('body')[0]; | |||
</p><p>var selection; | |||
</p><p>selection = window.getSelection(); | |||
</p><p>var pagelink = "<br /> <br /> Kaynak: <a href='"+document.location.href+"'>"+decodeURI(document.location.href)+"</a><br /> "; if(selection.toString().length>150) | |||
</p> | |||
<pre class="_fck_mw_lspace">{ | |||
var copytext = selection + pagelink; | |||
</pre> | |||
<pre class="_fck_mw_lspace"> var newdiv = document.createElement('div'); | |||
</pre> | |||
<pre class="_fck_mw_lspace"> newdiv.style.position='absolute'; | |||
</pre> | |||
<pre class="_fck_mw_lspace"> newdiv.style.left='-99999px'; | |||
</pre> | |||
<pre class="_fck_mw_lspace"> body_element.appendChild(newdiv); | |||
</pre> | |||
<pre class="_fck_mw_lspace"> newdiv.innerHTML = copytext; | |||
</pre> | |||
<pre class="_fck_mw_lspace"> selection.selectAllChildren(newdiv); | |||
</pre> | |||
<pre class="_fck_mw_lspace"> window.setTimeout(function() { | |||
</pre> | |||
<pre class="_fck_mw_lspace"> body_element.removeChild(newdiv); | |||
</pre> | |||
<pre class="_fck_mw_lspace"> },0); | |||
</pre> | |||
<pre class="_fck_mw_lspace">} | |||
</pre> | |||
<p>} | |||
</p><p>document.oncopy = addLink; /* var ozelGunMsj="Gazi Mustafa Kemal Atatürk ve tüm Mehmetçiklerimizi rahmet ve minnetle anıyoruz. "; | |||
</p><p>$("#content").prepend(" | |||
</p> | |||
<div style="\22 background-color:firebrick;"><img width=\"25%\" src=\"../atavebayrak.png\">"+ozelGunMsj+"</div> | |||
<p>"); | |||
</p> | |||
<ul><li>/</li></ul> | |||
<p>$(".GKSsec").on("click",function(){ | |||
</p> | |||
<pre class="_fck_mw_lspace"> 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); | |||
</pre> | |||
<p>}); | |||
</p></div> | |||
}); | |||
21.52, 17 Mart 2020 tarihindeki hâli
<div class="mw-parser-output"><p>function addLink() {
</p><p>var body_element = document.getElementsByTagName('body')[0];
</p><p>var selection;
</p><p>selection = window.getSelection();
</p><p>var pagelink = "<br /> <br /> Kaynak: <a href='"+document.location.href+"'>"+decodeURI(document.location.href)+"</a><br /> "; if(selection.toString().length>150)
</p>
<pre class="_fck_mw_lspace">{
var copytext = selection + pagelink;
</pre>
<pre class="_fck_mw_lspace"> var newdiv = document.createElement('div');
</pre>
<pre class="_fck_mw_lspace"> newdiv.style.position='absolute';
</pre>
<pre class="_fck_mw_lspace"> newdiv.style.left='-99999px';
</pre>
<pre class="_fck_mw_lspace"> body_element.appendChild(newdiv);
</pre>
<pre class="_fck_mw_lspace"> newdiv.innerHTML = copytext;
</pre>
<pre class="_fck_mw_lspace"> selection.selectAllChildren(newdiv);
</pre>
<pre class="_fck_mw_lspace"> window.setTimeout(function() {
</pre>
<pre class="_fck_mw_lspace"> body_element.removeChild(newdiv);
</pre>
<pre class="_fck_mw_lspace"> },0);
</pre>
<pre class="_fck_mw_lspace">}
</pre>
<p>}
</p><p>document.oncopy = addLink; /* var ozelGunMsj="Gazi Mustafa Kemal Atatürk ve tüm Mehmetçiklerimizi rahmet ve minnetle anıyoruz. ";
</p><p>$("#content").prepend("
</p>
<div style="\22 background-color:firebrick;"><img width=\"25%\" src=\"../atavebayrak.png\">"+ozelGunMsj+"</div>
<p>");
</p>
<ul><li>/</li></ul>
<p>$(".GKSsec").on("click",function(){
</p>
<pre class="_fck_mw_lspace"> 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);
</pre>
<p>});
</p></div>