MediaWiki:Common.js: Revizyonlar arasındaki fark

TIPlopedi sitesinden
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: &lt;a href='"+document.location.href+"'&gt;"+decodeURI(document.location.href)+"&lt;/a&gt;<br /> "; if(selection.toString().length&gt;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;">&lt;img width=\"25%\" src=\"../atavebayrak.png\"&gt;"+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);


function addLink() {
  sonuc= parseInt($(".GKSskorlar").attr("skorGKS1"))+parseInt($(".GKSskorlar").attr("skorGKS2"))+parseInt($(".GKSskorlar").attr("skorGKS3"));
 
console.log(sonuc);
var body_element = document.getElementsByTagName('body')[0];
$("#GKSsonuc").html(sonuc);
 
</pre>
var selection;
<p>});
 
</p></div>
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="Ata'mızı saygı, minnet ve özlemle 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);
});

22.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: &lt;a href='"+document.location.href+"'&gt;"+decodeURI(document.location.href)+"&lt;/a&gt;<br /> "; if(selection.toString().length&gt;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;">&lt;img width=\"25%\" src=\"../atavebayrak.png\"&gt;"+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>