// ==UserScript==
// @author FIRAT
// @name TeknoIZDIRAP
// @namespace http://teknoizdirap.com
// @description Teknoseyir.com için gelişmiş özellikler
// @include https://teknoseyir.com/*
// @version 0.6.5
// @icon http://teknoizdirap.com/izdirap48.png
// @icon64 http://teknoizdirap.com/izdirap64.png
// @grant none
// ==/UserScript==
//VERSİYON AYARLARI
version = '0.6.5';
lastVersion = localStorage.getItem('lastVersion');
if(!lastVersion) lastVersion='0.0.0';
depoVersion = localStorage.getItem('depoVersion');
if(!depoVersion) depoVersion='0.0.0';
versionFloat=parseFloat(version.substring(0,3));
lastVersionFloat=parseFloat(lastVersion.substring(0,3));
depoVersionFloat=parseFloat(depoVersion.substring(0,3));
versionFullFloat=parseFloat(version.replace(".","").replace(".",""));
$("body").append("<div style='z-index:10000;position:fixed;left:10px;bottom:10px;font-size:28px;font-weight:bold;background-color:#ff0000' id ='update'></div>");
updateDiv= document.getElementById("update");
//Yeni Sürüm Kontrol
updateTimeout = 0;
updateDelay = 60*60*12;
function versionCheck(){
var updateFark= new Date().getTime()/1000-localStorage.getItem("versionJsonUp");
if(localStorage.getItem("versionJson") && updateFark<updateDelay){
updateTimeout = Math.floor(updateDelay - updateFark);
window.versionJson = JSON.parse(localStorage.getItem("versionJson"));
if(versionJson) versionAlert();
}else{
console.log("Yeni Sürüm kontrol ediliyor");
updateTimeout = updateDelay;
$.get('https://api.myjson.com/bins/1eccgv', function (data, textStatus, jqXHR) {
var jsons = JSON.stringify(data);
window.versionJson = JSON.parse(jsons);
if(versionJson){
localStorage.setItem("versionJson", jsons);
localStorage.setItem("versionJsonUp", (new Date().getTime())/1000);
versionAlert();
}
});
}
console.log("Güncelleme " + updateTimeout+" saniye sonra kontrol edilecek");
setTimeout(versionCheck,1000+updateTimeout*1000);
}
versionCheck();
function versionAlert(){
//latestVersionFloat = parseFloat(window.versionJson["ver"].substring(0,3));
latestVersionFullFloat = parseFloat(window.versionJson["ver"].replace(".","").replace(".",""));
if(latestVersionFullFloat > versionFullFloat){
updateDiv.innerHTML= ("TeknoIzdırap Eklentisi Güncellemesi Mevcut (v" + window.versionJson["ver"] + ")...<br>");
updateDiv.innerHTML+="Güncellemek için <a target='_new' href='https://gf.qytechs.cn/tr/scripts/29000-teknoizdirap'>TIKLAYIN</a>.<br>";
updateDiv.innerHTML+= "Geri bildirimleri <a target='_new' href='https://teknoseyir.com/durum/673699'>ŞURAYA</a> yazabilirsiniz ?";
updateDiv.innerHTML+= "Güncelledikten sonra tüm Teknoseyir sekmelerini yenilemeyi unutmayın.";
updateDiv.innerHTML+="<div id='hideAlert' style='position:absolute;right:5px;bottom:5px;cursor:pointer'>X</div>";
}
}
//Güncellendi Uyarısı
if(versionFloat>depoVersionFloat){
localStorage.setItem('depoVersion',version);
localStorage.setItem('lastVersion',depoVersion);
updateDiv.innerHTML= ("TeknoIzdırap Eklentisi Güncellendi (v" + version + ")...<br>");
updateDiv.innerHTML+="Yeni özellikleri kontrol ve aktive etmek için <a href='https://teknoseyir.com/ayarlar'>ayarlar</a> sayfasına gidin.<br>";
updateDiv.innerHTML+="Bu uyarı yeni özellik eklediğinde sadece bir kereliğine görüntülenecektir.";
updateDiv.innerHTML+="<div id='hideAlert' style='position:absolute;right:5px;top:5px;cursor:pointer'>X</div>";
}
//TROLSAVAR AYARLARI
trollDay = 3;
trollDo="Gizle";
if(localStorage.getItem('trollDay')) trollDay = localStorage.getItem('trollDay').trim();
if(localStorage.getItem('trollDo')) trollDo = localStorage.getItem('trollDo').trim();
//HORTSAVAR AYARLARI
hortDay = 60;
hortDo="Uyar";
if(localStorage.getItem('hortDay')) hortDay = localStorage.getItem('hortDay').trim();
if(localStorage.getItem('hortDo')) hortDo = localStorage.getItem('hortDo').trim();
//FONT AYARLARI
if(!localStorage.getItem('fontSize')) localStorage.setItem('fontSize',14);
geceModAktif=false;
teknoTwitAktif=false;
aramaAktif=false;
rutbeAktif=false;
uyelikTarihiAktif=false;
trollSavarAktif=false;
hortSavarAktif=false;
durumSayisiAktif=false;
yorumSayisiAktif=false;
uyeDetayJsonLoaded=false;
kesfetReady=false;
darkMode=false;
profilAktif=false;
yorumParlatAktif=false;
spoilerAktif=false;
bildirimSayiDepo=0;
var sonuc = null;
function yaz(s){
if(!resultDiv){
setTimeout(yaz(s),1000);
return;
}
if (sonuc) {
clearTimeout(sonuc);
sonuc = null;
}
console.log(s);
resultDiv.innerHTML = s;
sonuc = setTimeout(function(){ resultDiv.innerHTML ='';},5000);
}
function update(){
geceModAktif = localStorage.getItem("geceModAktif");
teknoTwitAktif = localStorage.getItem("teknoTwitAktif");
aramaAktif = localStorage.getItem("aramaAktif");
rutbeAktif = localStorage.getItem("rutbeAktif");
uyelikTarihiAktif = localStorage.getItem("uyelikTarihiAktif");
bildirimAlertAktif = localStorage.getItem("bildirimAlertAktif");
bildirimTitleAktif = localStorage.getItem("bildirimTitleAktif");
profilAktif = localStorage.getItem("profilAktif");
trollSavarAktif = localStorage.getItem("trollSavarAktif");
hortSavarAktif = localStorage.getItem("hortSavarAktif");
durumSayisiAktif = localStorage.getItem("durumSayisiAktif");
yorumSayisiAktif = localStorage.getItem("yorumSayisiAktif");
fontAktif = localStorage.getItem("fontAktif");
fontButonAktif = localStorage.getItem("fontButonAktif");
fontSize = localStorage.getItem("fontSize");
yorumParlatAktif = localStorage.getItem("yorumParlatAktif");
spoilerAktif = localStorage.getItem("spoilerAktif");
resimAktif = localStorage.getItem("resimAktif");
bildirimSayiDepo = localStorage.getItem("bildirimSayi");
}
function font(){
if(!fontAktif) return;
if(location.pathname == '/ayarlar') $(".örnek").css('font-size', fontSize);
var $window = $(window),
viewport_top = $window.scrollTop(),
viewport_height = $window.height(),
viewport_bottom = viewport_top + viewport_height;
$("#col-left div.content, textarea").each(function(){
var top = $(this).offset().top,
height = $(this).height(),
bottom = top + height;
if ( bottom > viewport_top ) {//sadece ekranın aşağısındakileri büyütüyoruz
$(this).css('font-size', fontSize);
$("textarea").css('min-height', fontSize*2);
}
});
}
function spoiler(){
if(!spoilerAktif) return;
$(".hash_tag-spoiler").find(".content, .gallery, .embed").not(".spoiler").each(function(){
$(this).addClass("spoiler");
$(this).addClass("on");
});
}
//======================GECE MODU======================//
sunHour = 07;
sunMinute = 30;
moonHour = 19;
moonMinute = 30;
randomSaniye = 2000 + Math.floor(Math.random() * 60000)/15;
function GeceModu(){
darkMode = $('#koyu_css-css').length===0 ? false : true;
if(localStorage.getItem('sunHour')) sunHour = localStorage.getItem('sunHour').trim();
if(localStorage.getItem('sunMinute')) sunMinute =localStorage.getItem('sunMinute').trim();
if(localStorage.getItem('moonHour')) moonHour = localStorage.getItem('moonHour').trim();
if(localStorage.getItem('moonMinute')) moonMinute = localStorage.getItem('moonMinute').trim();
d = new Date();
h = d.getHours();
m = d.getMinutes();
s = d.getSeconds();
timeSun = new Date("1923-10-29");
timeSun.setHours(sunHour, sunMinute,0);
timeMoon = new Date("1923-10-29");
timeMoon.setHours(moonHour, moonMinute,0);
timeNow = new Date("1923-10-29");
timeNow.setHours(h, m, s);
if (document.getElementById('koyu_tema')) {
l = document.getElementById('koyu_tema').getElementsByTagName('a')[0];
if(timeNow>timeMoon || timeNow<timeSun){
sonuc = setTimeout(gece,3000);
}else{
sonuc = setTimeout(gunduz,3000);
}
}
}
function gece() {
if (!darkMode && JSON.parse(localStorage.getItem("geceModAktif"))) {
console.log("gece");
$('head').append('<link rel="stylesheet" id="koyu_css-css" href="https://teknoseyir.com/wp-content/themes/ts/koyu.css?ver=1.13" type="text/css" media="screen">');
darkMode=true;
localStorage.setItem("clickWaiting", true);
yaz("Tema " + Math.floor(randomSaniye/1000) + " saniye içinde düzeltilecek");
setTimeout(geceModFix, randomSaniye);
$(".kesfet").attr('class','kesfet kesfetDark');
}
}
function gunduz() {
if (darkMode && JSON.parse(localStorage.getItem("geceModAktif"))) {
console.log("gündüz");
$( "link" ).remove( "#koyu_css-css" );
darkMode=false;
localStorage.setItem("clickWaiting", true);
yaz("Tema " + Math.floor(randomSaniye/1000) + " saniye içinde düzeltilecek");
setTimeout(geceModFix, randomSaniye);
$(".kesfet").attr('class','kesfet kesfetLight');
}
}
function geceModFix(){
yaz("Tema Düzeltiliyor");
console.log(localStorage.getItem("clickWaiting"));
if(JSON.parse(localStorage.getItem("clickWaiting"))){
if (($('.fa-sun').length > 0 && darkMode===false) || ($('.fa-moon').length > 0 && darkMode===true)){
l.click();
clickWaiting = localStorage.setItem("clickWaiting", false);
console.log("Tıkladık");
}
return;
}
console.log("Tıklamadık");
twitLoad();
resim();
button();
yorumParlat(false);
$("[brightness=1]").each(function(){
$(this).removeAttr("brightness");
$(this).css("-moz-filter", "brightness(100%)");
$(this).css("filter", "brightness(100%)");
});
if (($('.fa-sun').length >0)) {
$('.fa-sun').parent().html('<i class="fa fa-moon"></i> Gece modunu aç');
}else{
$('.fa-moon').parent().html('<i class="fa fa-sun"></i> Gece modunu kapat');
}
}
//======================GECE MODU SON======================//
function button(){
if(fontButonAktif){
$("#fontButtons").remove();
$("#col-left").append('<div id="fontButtons" style="position: fixed; bottom: 10px; right: 51px; z-index:1000;">'+
'<input class="btn btn-danger" style="background-color:'+ $("body").css("background-color") + ';color:'+ $("body").css("color") + ';border-color:' + $("body").css("border-color") + ';" id="fontadd" type="button" value=" + " />'+
'<input class="btn btn-danger" style="background-color:'+ $("body").css("background-color") + ';color:'+ $("body").css("color") + ';border-color:' + $("body").css("border-color") + ';" id="fontmin" type="button" value=" - " />' +
'<div');
}
}
function yorumParlat(scroll){
if(window.location.hash.substr(1)!=="" && window.location.hash.substr(1)!=="m" && yorumParlatAktif){
var $com = $("#"+window.location.hash.substr(1));
if(!darkMode) {
rgb = "rgba(255, 240, 204, ";
}else{
rgb = "rgba(100, 100, 100, ";
}
setTimeout(function(){
$com.css("background-color", rgb + "0.7)");
},1500);
if(scroll){
$('html, body').animate({
scrollTop: $com.offset().top-55
}, 1000);
}
$com.hover(function() {
$(this).animate({ 'background-color': rgb + '0)' },1000);
});
}
}
//======================RESİM KARART======================//
function resim(){
if(!resimAktif || !darkMode) return;
$("img, .embed img").not("[brightness]").not(".kesfet").each(function() {//.filter(":onScreen")
$(this).attr('brightness','1');
$src = ($(this).attr('src'));
brightness=50;
$(this).css("-moz-filter", "brightness("+brightness+"%)");
$(this).css("filter", "brightness("+brightness+"%)");
});
$("#twitSol, #twitSag").not("[brightness]").each(function() {
var $col= $(this);
$('[id^=twitter-widget]').contents().find('*').not("[brightness]").each(function () {
$(this).css("background-color", "#333");
$(this).find('p, span').css("color", "#bbb");
$image = $(this).find('img, div.tcu-imageWrapper').not("[brightness]");
$image.css("-moz-filter", "brightness("+brightness+"%)");
$image.css("filter", "brightness("+brightness+"%)");
$image.css("color", "#bbb");
$(this).attr('brightness','1');
});
//$col.attr('brightness','ok');
});
}
//======================RESİM KARART SON======================//
//======================PROFİL FONKSİYON======================//
var url = window.location.href;
var urlarr = url.split('/');
var userid = "@"+urlarr[4];
function profil() {
if (!userid || !location.pathname.startsWith('/u/') || !profilAktif) return;
console.log(userid);
var dataget = document.body.innerHTML;
var dataarr = dataget.split('<section id="col-right"');
var data = dataarr[0];
var matches = data.match(/id="post-\d+"/g);
function myFunction(item, index, arr) {
arr[index] = item.replace(/[^0-9.]/g, '');
}
matches.forEach(myFunction);
var i;
for (i = 0; i < matches.length; i++) {
var elemid = 'post-' + matches[i];
var elem = document.getElementById(elemid);
if (elem) {
var elem2 = elem.getElementsByClassName('stream-top') [0];
if (elem2) {
var elem3 = elem2.getElementsByClassName('author') [0];
if (elem3) {
var uspan = elem3.getElementsByClassName('username') [0].innerHTML;
if (uspan != userid) {
elem.style.display="none";
console.log("gizlendi");
}
}
}
}
}
}
//======================PROFİL FONKSİYON SON======================//
//======================ÜYE DETAY======================//
function getAllElementsWithAttribute(attribute){
if(!document.getElementById('col-left')) return false;
var matchingElements = [];
var allElements = document.getElementById('col-left').getElementsByTagName('*');
for (var i = 0, n = allElements.length; i < n; i++){
if (allElements[i].getAttribute(attribute) !== null){
matchingElements.push(allElements[i]);
}
}
return matchingElements;
}
function uyeDetay() {
if(uyeDetayJsonLoaded){
var objs = getAllElementsWithAttribute('data-object_id');
if(objs === false) return;
for (i = 0; i < objs.length; i++) {
var arts= objs[i].parentNode;
var art;
while(arts && arts.getAttribute('id')===null) arts = arts.parentNode;
if(!arts.getAttribute('id') || arts.getAttribute('id').startsWith("troll")) continue;
if(arts.getAttribute('id').startsWith("post") || arts.getAttribute('id').startsWith("comment")) art = arts;
var cl = objs[i].getAttribute('class');
var parentcl = objs[i].parentNode.getAttribute('class');
if (objs[i].getAttribute('data-object_id')) {
var uid = objs[i].getAttribute('data-object_id');
if (objs[i].getAttribute('data-action') == 'user_info' && parentcl!="paylas_bilgi" &&(cl == 'comment-heading' || cl == 'author') && uid > 0) {
var durum = objs[i].getAttribute('uyeDetay');
var arttrollDurum = art.getAttribute('troll');
if (!durum) {
var artId = art.getAttribute("id");
var uyeDetaylar="";
var tarih, r, t, tt, time, d, m,y;
if((!window.uyeDetayJson['u'][uid])){
time = new Date();
tarih ='Bilinmiyor';
}else if (window.uyeDetayJson['u'][uid]['t']!==null) {
tt = window.uyeDetayJson['u'][uid]['t'];
time = ((tt)*86400+1399842000)*1000;
t = new Date(time);
d = t.getDate();
m = t.getMonth()+1;
y = t.getFullYear();
tarih= d+'.'+m+'.'+y;
} else {
tarih = "Bilinmiyor";//üyelik tarihi bilinmiyor
}
if(trollSavarAktif){
if(!arttrollDurum){
var gun = (new Date()-time)/86400000;
if(gun<=trollDay){
if(trollDo=="Uyar") uyeDetaylar += ' -- ' + "<b>TROLL OLABİLİR</b>";
if(trollDo=="Sil") art.display="none";
if(trollDo=="Gizle"){
console.log(artId);
art.setAttribute('troll', '1');
}
}
}
$("[troll=1]").each(function(){
var trollId = "troll-" + $(this).attr("id");
trollMesaj=""+
'<div id="' + $(this).attr("id") + '" style="cursor:pointer" class="stream-top troll">'+
'Troll Şüphesi Olan İçerik Gizlendi (<' + trollDay + ' günlük üye). İçeriği görmek için tıklayın.'+
'<ul class="dropdown-menu"></ul>'+
'</div>'+
'</div>';
var mesajYedek = "<div id='" + trollId + "'style='display;'>"+$(this).html()+"</div>";
$(this).attr("troll","2");
$(this).html( trollMesaj );
$(this).append(mesajYedek);
$('#'+trollId).hide();
});
}
if((window.uyeDetayJson['u'][uid])){
if(uyelikTarihiAktif){
uyeDetaylar += ' -- ' + tarih;
}
if(durumSayisiAktif){
uyeDetaylar += ' -- D:~' + (window.uyeDetayJson['u'][uid]['d']);
}
if(yorumSayisiAktif){
uyeDetaylar += ' -- Y:~' + (window.uyeDetayJson['u'][uid]['y']);
}
if(rutbeAktif){
if (window.uyeDetayJson['u'][uid]['r']) {
r = window.uyeDetayJson['r'][window.uyeDetayJson['u'][uid]['r']];
} else {
r = window.uyeDetayJson['r'][0];
}
uyeDetaylar += ' -- ' + r;
}
}
objs[i].innerHTML += "<span style='font-size:12px;font-weight:100;'>"+uyeDetaylar+"</span>";
objs[i].setAttribute('uyeDetay', '1');
}
}
}
}
}
}
//======================ÜYE DETAY SON======================//
//======================TEKNOTWİT======================//
teknoTwitHeight=0;
twitSol="Karma";
twitSag="Keşfet";
if(localStorage.getItem('teknoTwitHeight')) teknoTwitHeight = localStorage.getItem('teknoTwitHeight').trim();
if(localStorage.getItem('twitSol')) twitSol = localStorage.getItem('twitSol');
if(localStorage.getItem('twitSag')) twitSag = localStorage.getItem('twitSag');
colRight = document.getElementById('col-right');
colLeft = document.getElementById('col-move');
$('head').append('<script type="text/javascript" src="https://platform.twitter.com/widgets.js">');
if(colLeft && !document.getElementById("SolDiv")){
SolDiv = document.createElement('div');
SolDiv.id = 'twitSol';
colLeft.insertBefore(SolDiv, colLeft.firstChild);
}
if(colRight && !document.getElementById("SagDiv")){
SagDiv = document.createElement('div');
SagDiv.id = 'twitSag';
colRight.insertBefore(SagDiv, colRight.children[3]);
}
function twitLoad(){
if(location.pathname !== "/") return;//sadece ana sayfada çıksın
var twitters = ["leventp", "gamsizm", "hkellecioglu"];
twitRandom = Math.floor(Math.random() * 3);
if(!teknoTwitAktif) return;
var data1= '<a class="twitter-timeline" ';
if(darkMode) data1 += 'data-theme="dark" ';
if(teknoTwitHeight>0) data1 += 'data-height="'+ teknoTwitHeight +'" ';
if(twitSol=="Karma") twitSol = "teknoizdirap/lists/teknoseyir";
if(twitSag=="Karma") twitSag = "teknoizdirap/lists/teknoseyir";
if(colLeft && twitSol!=="Boş" && twitSol!=="Keşfet"){
if(twitSol=="Döngü"){
twitSol=twitters[twitRandom];
}
SolDiv.innerHTML = data1 + 'data-lang="tr" href="https://twitter.com/'+ twitSol +'"></a><script async src="//platform.twitter.com/widgets.js" charset="utf-8"></script> ';
twttr.widgets.load( $("#twitSol")[0] );
}
if(colRight && twitSag!=="Boş" && twitSag!=="Keşfet"){
if(twitSag=="Döngü"){
if(twitRandom==2) twitRandom=-1;
twitSag=twitters[twitRandom+1];
}
while(twitSag==twitSol){
if(twitRandom==2) twitRandom=-1;
twitRandom++;
twitSag=twitters[twitRandom];
}
SagDiv.innerHTML = data1 + 'data-lang="tr" href="https://twitter.com/'+ twitSag +'"></a><script async src="//platform.twitter.com/widgets.js" charset="utf-8"></script> ';
twttr.widgets.load( $("#twitSag")[0] );
}
}
//======================TEKNOTWİT SON======================//
//======================HORTSAVAR SON======================//
function hortSavar(){
if(hortSavarAktif && location.pathname === '/'){
$('#col-left').find('article').not("[hort]").each(function() {
$(this).attr('hort', '1');
var start = new Date(($(this).find('.timeago').attr("datetime"))),
fark = new Date(new Date() - start),
gun = fark/1000/60/60/24;
if(gun-hortDay>=0){
console.log("Hort bulundu");
article = $(this).closest('article');
if(hortDo=="Uyar") $(this).prepend("<h2 style='margin:20px; text-align:center'>DİKKAT HORT KONU</h2>");
if(hortDo=="Sil") $(this).hide();
if(hortDo=="Gizle"){
var hortId = "hort-" + $(this).attr("id");
hortMesaj=""+
'<div id="' + $(this).attr("id") + '" class="stream-top hort">'+
'Hort İçerik Gizlendi (' + Math.round(gun) + ' günlük [>' + hortDay + '] gönderi). İçeriği görmek için tıklayın.'+
'<ul class="dropdown-menu"></ul>'+
'</div>'+
'</div>';
var mesajYedek = "<div id='" + hortId + "'style='display;'>"+$(this).html()+"</div>";
//$(this).attr("hort","2");
$(this).html( hortMesaj );
$(this).append(mesajYedek);
$('#'+hortId).hide();
}
}
});
}
}
//======================HORTSAVAR SON======================//
document.onreadystatechange = function () {
if (document.readyState == "complete") {
update();
GeceModu();
twitLoad();
uyeDetay();
profil();
yorumParlat(true);
setInterval(update, 1000);
setInterval(profil, 1000);
setInterval(GeceModu, 1000);
setInterval(uyeDetay, 1000);
setInterval(hortSavar, 1000);
setInterval(font, 200);
setInterval(resim, 1000);
setInterval(spoiler, 1000);
//font();
var yeniStyle = $('<style>.yeni {color:#ff0000;font-weight:bold;}</style>');
$('html > head').append(yeniStyle);
$(document)
.on('click', '.troll', function() {
$('#'+($(this).attr("id"))).html($('#troll-'+($(this).attr("id"))).html());
});
$(document)
.on('click', '.hort', function() {
$('#'+($(this).attr("id"))).html($('#hort-'+($(this).attr("id"))).html());
});
$(document)
.on('click', '#hideAlert', function() {
$("#update").hide();
});
$(document)
.on('mouseover', '[brightness=1]', function() {
$(this).css("-webkit-filter", "brightness("+100+"%)");
$(this).css("filter", "brightness("+100+"%)");
$(this).attr("brightness","2");
});
$(document)
.on('click', '[brightness]', function() {
var ayarla = $(this).attr("brightness") === 1 ? brightness : 100;
$(this).css("-moz-filter", "brightness("+ayarla+"%)");
$(this).css("filter", "brightness("+ayarla+"%)");
});
$(document)
.on('mouseout', '[brightness=2]', function() {
$(this).css("-moz-filter", "brightness("+brightness+"%)");
$(this).css("filter", "brightness("+brightness+"%)");
$(this).attr("brightness","1");
});
//======================OTOMATİK GECE MODU AÇ/KAPAT======================//
var koyu = $("#koyu_tema");
koyu.after('<li id="koyu_tema_izdirap"></li>');
setInterval(function(){
var io = geceModAktif === true ? "Kapat" : "Aç";
$('#koyu_tema_izdirap').html('<a href="#"><i class="fa fa-sun"></i> / <i class="fa fa-moon"></i> Gece/Gündüz <br> Otomatik Modunu '+io+'</a>');
},1000);
$('#koyu_tema_izdirap').click(function() {
var io = geceModAktif === true ? "Kapat" : "Aç";
localStorage.setItem("geceModAktif", !geceModAktif);
yaz("Otomatik Gece Modu "+io+"ıldı.");
});
//======================OTOMATİK GECE MODU AÇ/KAPAT SON======================//
//======================AYARLAR SAYFASI======================//
if(location.pathname == '/ayarlar') {
var ul = document.getElementById("profile-tabs");
var a = document.createElement("a");
var li = document.createElement("li");
a.textContent = "TeknoIzdırap";
a.setAttribute('href', "https://teknoseyir.com/ayarlar#izdirap");
li.appendChild(a);
ul.appendChild(li);
li.setAttribute("id", "tab-izdirap");
a.setAttribute("data-toggle", "tab");
ayarlar= "<div class='tab-pane' id='izdirap'>"+
"<div style='cursor:pointer;' id='checkUpdate'><b>Yeni Sürüm Kontrol Et</b></div>"+
"<h2>Changelog...(v"+version+")</h2>"+
"<br><b>0.6.5:</b><br>"+
"- Küçük hata düzeltmeleri.<br>"+
"<br><b>0.6.4:</b><br>"+
"- Otomatik Gece/Gündüz Modu'nu hızlı açıp kapatmak için Normal gece modu butonun altına ek buton eklendi.<br>"+
"- \"Bildirim sayısını sekme adına ekle\" ve \"Bildirim gelince sekmeye geç\" özellikleri için sekmeler arası senkronizasyon sağlandı. Bildirim çanındaki değerden daha doğru bir değer gösteriyor. ?<br>"+
"<br><b>0.6.1-0.6.3:</b><br>"+
"- Hata düzeltmeleri.<br>"+
"<br><b>0.6:</b><br>"+
"- <span class='yeni'>Dahili Güncelleme</span> sistemi eklendi. Artık " + updateDelay/60/60 + " saatte bir sürüm numarası kontrol edilecek.<br>"+
"- TeknoTwit için <span class='yeni'>Karma Liste</span> seçeneği eklendi.<br>"+
"- TeknoTwit için <span class='yeni'>yükseklik</span> ayarı eklendi.<br>"+
"- [KALDIRILDI]Gece modu manuel kapatılamama sorunu KISMEN düzeltildi (manuel kapattıktan sonra sayfaları yenilemek gerekiyor), gece modunu manuel değiştirince 8 saatliğine otomatik özelliği kapanıyor.<br>"+
"<br><b>0.5:</b><br>"+
"- <span class='yeni'>Spoiler</span> özelliği için <span class='yeni'>ilk adım</span> atıldı.<br>"+
"- Sekme adındaki bildirim sayılarının arka arkaya eklenmesi düzeltildi (yani umarım ?, yine sorun olursa bildirin).<br>"+
"- Küçük hata düzeltmeleri.<br>"+
"<br><b>0.1-0.4:</b><br>"+
"- Geliştirme süreci ?<br>"+
"<hr><hr>"+
"<h3 id='izdirap'>TeknoIzdırap Ayarları</h3>"+
//========GECEMOD========//
//"<hr>"+
"<div class='checkbox'><label><input id='gecemod' type='checkbox' autocomplete='off'>Otomatik Gece/Gündüz Modu</label></div>"+
"<div id='geceModDetay'>"+
"Gündüz: <input style='width:40px' type='number'value='" + sunHour + "' maxlength='2' size='2' id='sunHour'>:<input style='width:40px' type='number' min='0' max='59' value='" + sunMinute + "' id='sunMinute'><br>"+
"Gece : <input style='width:40px' type='number' value='" + moonHour + "' maxlength='2' size='2' id='moonHour'>:<input style='width:40px' type='number' min='0' max='59' value='" + moonMinute + "' id='moonMinute'>"+
"</div>"+
"<div class='checkbox'><label><input id='resim' type='checkbox' autocomplete='off'>Gece modu aktifken resimleri karart (üzerine gelince aydınlanır)</label></div><hr>"+
//======GECEMOD SON======//
//========TWİT========//
//"<hr>"+
"<div class='checkbox'><label><input id='teknotwit' type='checkbox' autocomplete='off'>TeknoTwit</label>"+
"</div>"+
"<div id='twitDetay'>"+
"Teknotwit Sütununun Yüksekliği: <input style='width:50px' type='number' value='" + teknoTwitHeight + "' maxlength='4' size='4' id='teknoTwitHeight'> piksel (0=sınırsız)";
if(lastVersionFloat<0.6) ayarlar+= "<span class='yeni'> (YENİ)</span><br>";
ayarlar+=
"Sol Sütun: <select id='twitSol'>"+
"<option value='Karma'>Karma Liste</option>"+
"<option value='hkellecioglu'>Hamdi Kellecioğlu</option>"+
"<option value='gamsizm'>Murat Gamsız</option>"+
"<option value='leventp'>Levent Pekcan</option>"+
"<option value='Boş'>Boş Kalsın</option>"+
"<option value='Döngü'>Döngü</option>"+
"<option value='Keşfet'>Keşfet</option>"+
"</select> "+
"Sağ Sütun: <select id='twitSag'>"+
"<option value='Karma'>Karma Liste</option>"+
"<option value='hkellecioglu'>Hamdi Kellecioğlu</option>"+
"<option value='gamsizm'>Murat Gamsız</option>"+
"<option value='leventp'>Levent Pekcan</option>"+
"<option value='Boş'>Boş Kalsın</option>"+
"<option value='Döngü'>Döngü</option>"+
"<option value='Keşfet'>Keşfet</option>"+
"</select>";
if(lastVersionFloat<0.6) ayarlar+= "<span class='yeni'> (YENİ SEÇENEK VAR)</span>";
ayarlar+= "<hr></div>"+
//======TWİT SON======//
"<div class='checkbox'><label><input id='bildirimAlert' type='checkbox' autocomplete='off'>Bildirim gelince sekmeye geç (<b>DİKKAT!!!</b> Birden fazla sekmede TS açıksa sinir edebilir ?)</label></div>"+
"<div class='checkbox'><label><input id='bildirimTitle' type='checkbox' autocomplete='off'>Bildirim sayısını sekme adına ekle ([sayi] şeklinde ekler)</label></div>"+
"<div class='checkbox'><label><input id='rutbe' type='checkbox' autocomplete='off'>Akışta TeknoRütbe'leri göster</label></div>"+
"<div class='checkbox'><label><input id='uyeliktarihi' type='checkbox' autocomplete='off'>Akışta üyelik tarihlerini göster</label></div>"+
"<div class='checkbox'><label><input id='durumsayisi' type='checkbox' autocomplete='off'>Akışta yaklaşık durum sayılarını göster</label></div>"+
"<div class='checkbox'><label><input id='yorumsayisi' type='checkbox' autocomplete='off'>Akışta yaklaşık yorum sayılarını göster</label></div>"+
//========TROLL========//
//"<hr>"+
"<div class='checkbox'><label><input id='trollsavar' type='checkbox' autocomplete='off'>Troll Savar</label></div>"+
"<div id='trollSavarDetay'>"+
"<input style='width:40px' type='number'value='" + trollDay + "' maxlength='2' size='2' id='trollDay'> günden yeni üyeleri: "+
"<select id='trollDo'><option value='Gizle'>Gizle (Gönderiyi gizler, göstermek için buton ekler)</option><option value='Uyar'>Uyar (Gönderiyi gizlemez, sadece uyarı mesajı ekler)</option><option value='Sil'>Sil (Gönderi gizler, uyarı mesajı da eklemez)</option></select>"+
"<hr></div>"+
//======TROLL SON======//
//========HORT========//
//"<hr>"+
"<div class='checkbox'><label><input id='hortsavar' type='checkbox' autocomplete='off'>Hort Savar</label></div>"+
"<div id='hortSavarDetay'>"+
"<input style='width:40px' type='number'value='" + hortDay + "' maxlength='2' size='2' id='hortDay'> günden eski konuları: "+
"<select id='hortDo'><option value='Gizle'>Gizle (Gönderiyi gizler, göstermek için buton ekler)</option><option value='Uyar'>Uyar (Gönderiyi gizlemez, sadece uyarı mesajı ekler)</option><option value='Sil'>Sil (Gönderi gizler, uyarı mesajı da eklemez)</option></select>"+
"<hr></div>"+
//======HORT SON======//
//========FONT========//
"<div class='checkbox'><label><input id='font' type='checkbox' autocomplete='off'>Font boyutunu ayarla</label></div>"+
"<div id='fontDetay'>"+
'FONT BOYUTU: '+
'<div class="örnek">Örnek</div>'+
'<input id="fontadd" type="button" value=" + " />'+
'<input id="fontmin" type="button" value=" - " />'+
"<div class='checkbox'><label><input id='fontButon' type='checkbox' autocomplete='off'>Butonları her sayfada göster</label></div>"+
"</div>"+
//======FONT SON======//
"<div class='checkbox'><label><input id='yorumParlat' type='checkbox' autocomplete='off'>Yorumlar üzerine gelene kadar parlasın</label></div>"+
"<div class='checkbox'><label><input id='spoiler' type='checkbox' autocomplete='off'>'#spoiler' içeren mesajları blurla</label>"+
"<span class='yeni'> (";
if(lastVersionFloat<0.5) ayarlar+="YENİ, ";
ayarlar+= "DENEYSEL!!!, GELİŞTİRİLECEK)</span></div>" +
"<hr><hr><hr><hr><hr>"+
"<div class='checkbox'><label><input id='arama' type='checkbox' autocomplete='off'>Gelişmiş Arama (Pek Yakında ?)</label></div>"+
"<div class='checkbox'><label><input id='spoilerButonu' type='checkbox' autocomplete='off'>Spoiler Butonu (Pek Yakında ?)</label></div>"+
"<div class='checkbox'><label><input id='emoji' type='checkbox' autocomplete='off'>Emoji Butonu (Pek Yakında ?)</label></div>"+
"<div class='checkbox'><label><input id='engelle' type='checkbox' autocomplete='off'>HashTag/Kelime Engelleme (Pek Yakında ?)</label></div>"+
"<div class='checkbox'><label><input id='yorum' type='checkbox' autocomplete='off'>Yorumları sırala (Pek Yakın Olmayan Bir Gelecekte ? Belki de asla ?)</label></div>";
for(basma=0;basma<5;basma++){
ayarlar+= "<h2>=================KAYDET'E BASMA=================</h2>";
}
ayarlar+= "<div class='checkbox'><label><input id='factoryReset' type='checkbox' autocomplete='off'>TÜM AYARLARI SIFIRLA (BASAR BASMAZ SIFIRLAR)</label></div>"+
"<table class='table form-table bildirim'>"+
"</table>"+
"</div>";
ayarDiv = document.createElement('div');
ayarDiv.id = 'izdirap';
ayarDiv.className = 'tab-pane';
document.getElementsByClassName('tab-content')[0].appendChild(ayarDiv);
ayarDiv.innerHTML = ayarlar;
setInterval(function(){
document.getElementById("gecemod").checked = geceModAktif;
document.getElementById("teknotwit").checked = teknoTwitAktif;
document.getElementById("arama").checked = aramaAktif;
document.getElementById("rutbe").checked = rutbeAktif;
document.getElementById("uyeliktarihi").checked = uyelikTarihiAktif;
document.getElementById("trollsavar").checked = trollSavarAktif;
document.getElementById("hortsavar").checked = hortSavarAktif;
document.getElementById("durumsayisi").checked = durumSayisiAktif;
document.getElementById("yorumsayisi").checked = yorumSayisiAktif;
document.getElementById("bildirimAlert").checked = bildirimAlertAktif;
document.getElementById("bildirimTitle").checked = bildirimTitleAktif;
document.getElementById("font").checked = fontAktif;
document.getElementById("fontButon").checked = fontButonAktif;
document.getElementById("yorumParlat").checked = yorumParlatAktif;
document.getElementById("spoiler").checked = spoilerAktif;
document.getElementById("resim").checked = resimAktif;
document.getElementById("geceModDetay").style.display = geceModAktif === true ? "block" : "none";
document.getElementById("twitDetay").style.display = teknoTwitAktif === true ? "block" : "none";
document.getElementById("trollSavarDetay").style.display = trollSavarAktif === true ? "block" : "none";
document.getElementById("hortSavarDetay").style.display = hortSavarAktif === true ? "block" : "none";
document.getElementById("fontDetay").style.display = fontAktif === true ? "block" : "none";
$("#twitSol").val(twitSol);
$("#twitSag").val(twitSag);
$("#trollDo").val(trollDo);
$("#hortDo").val(hortDo);
},1000);
$('#checkUpdate').click(function() {
localStorage.setItem("versionJsonUp",0);
yaz("Güncelleştirmeler Kontrol Ediliyor...");
});
$('#gecemod').click(function() {
var gecemod = document.getElementById("gecemod");
geceModAktif=gecemod.checked;
document.getElementById("geceModDetay").style.display = geceModAktif === true ? "block" : "none";
localStorage.setItem("geceModAktif", geceModAktif);
yaz("Kaydedildi (Eklenti kurulmadan önce açılan sekmelere F5 lütfen ?)");
});
$('#teknotwit').click(function() {
var teknotwit = document.getElementById("teknotwit");
teknoTwitAktif=teknotwit.checked;
document.getElementById("twitDetay").style.display = teknoTwitAktif === true ? "block" : "none";
localStorage.setItem("teknoTwitAktif", teknoTwitAktif);
yaz("Kaydedildi");
});
$('#arama').click(function() {
var arama = document.getElementById("arama");
aramaAktif = arama.checked;
localStorage.setItem("aramaAktif", aramaAktif);
yaz("Kaydedildi (Ama daha eklemedim bunu kodlara, sonraki güncellemede gelecek ?)");
});
$('#rutbe').click(function() {
var rutbe = document.getElementById("rutbe");
rutbeAktif=rutbe.checked;
localStorage.setItem("rutbeAktif", rutbeAktif);
yaz("Kaydedildi (Sekmelere F5 lütfen ?)");
});
$('#uyeliktarihi').click(function() {
var uyeliktarihi = document.getElementById("uyeliktarihi");
uyelikTarihiAktif=uyeliktarihi.checked;
localStorage.setItem("uyelikTarihiAktif", uyelikTarihiAktif);
yaz("Kaydedildi (Sekmelere F5 lütfen ?)");
});
$('#trollsavar').click(function() {
var trollsavar = document.getElementById("trollsavar");
trollSavarAktif=trollsavar.checked;
document.getElementById("trollSavarDetay").style.display = trollSavarAktif === true ? "block" : "none";
localStorage.setItem("trollSavarAktif", trollSavarAktif);
yaz("Kaydedildi (Sekmelere F5 lütfen ?)");
});
$('#hortsavar').click(function() {
var hortsavar = document.getElementById("hortsavar");
hortSavarAktif=hortsavar.checked;
document.getElementById("hortSavarDetay").style.display = hortSavarAktif === true ? "block" : "none";
localStorage.setItem("hortSavarAktif", hortSavarAktif);
yaz("Kaydedildi (Sekmelere F5 lütfen ?)");
});
$('#durumsayisi').click(function() {
var durumsayisi = document.getElementById("durumsayisi");
durumSayisiAktif=durumsayisi.checked;
localStorage.setItem("durumSayisiAktif", durumSayisiAktif);
yaz("Kaydedildi (Sekmelere F5 lütfen ?)");
});
$('#yorumsayisi').click(function() {
var yorumsayisi = document.getElementById("yorumsayisi");
yorumSayisiAktif=yorumsayisi.checked;
localStorage.setItem("yorumSayisiAktif", yorumSayisiAktif);
yaz("Kaydedildi (Sekmelere F5 lütfen ?)");
});
$('#bildirimAlert').click(function() {
var bildirimAlert = document.getElementById("bildirimAlert");
bildirimAlertAktif=bildirimAlert.checked;
localStorage.setItem("bildirimAlertAktif", bildirimAlertAktif);
yaz("Kaydedildi (Sekmelere F5 lütfen ?)");
});
$('#bildirimTitle').click(function() {
var bildirimTitle = document.getElementById("bildirimTitle");
bildirimTitleAktif=bildirimTitle.checked;
localStorage.setItem("bildirimTitleAktif", bildirimTitleAktif);
yaz("Kaydedildi (Sekmelere F5 lütfen ?)");
});
$('#font').click(function() {
var font = document.getElementById("font");
fontAktif=font.checked;
document.getElementById("fontDetay").style.display = teknoTwitAktif === true ? "block" : "none";
localStorage.setItem("fontAktif", fontAktif);
yaz("Kaydedildi (Sekmelere F5 lütfen ?)");
});
$('#fontButon').click(function() {
var fontButon = document.getElementById("fontButon");
fontButonAktif=fontButon.checked;
localStorage.setItem("fontButonAktif", fontButonAktif);
yaz("Kaydedildi (Sekmelere F5 lütfen ?)");
});
$('#yorumParlat').click(function() {
var yorumParlat = document.getElementById("yorumParlat");
yorumParlatAktif=yorumParlat.checked;
localStorage.setItem("yorumParlatAktif", yorumParlatAktif);
yaz("Kaydedildi (Sekmelere F5 lütfen ?)");
});
$('#spoiler').click(function() {
var spoiler = document.getElementById("spoiler");
spoilerAktif=spoiler.checked;
localStorage.setItem("spoilerAktif", spoilerAktif);
yaz("Kaydedildi (Sekmelere F5 lütfen ?)");
});
$('#resim').click(function() {
var resim = document.getElementById("resim");
resimAktif=resim.checked;
localStorage.setItem("resimAktif", resimAktif);
yaz("Kaydedildi (Sekmelere F5 lütfen ?)");
});
$('#sunHour').on('input', function() {
localStorage.setItem("sunHour", $(this).val());
yaz("Gündüz Saati Kaydedildi: "+$(this).val());
});
$('#sunMinute').on('input', function() {
localStorage.setItem("sunMinute", $(this).val());
yaz("Gündüz Dakikası Kaydedildi: "+$(this).val());
});
$('#moonHour').on('input', function() {
localStorage.setItem("moonHour", $(this).val());
yaz("Gece Saati Kaydedildi: "+$(this).val());
});
$('#moonMinute').on('input', function() {
localStorage.setItem("moonMinute", $(this).val());
yaz("Gece Dakikası Kaydedildi: "+$(this).val());
});
$('#teknoTwitHeight').on('input', function() {
localStorage.setItem("teknoTwitHeight", $(this).val());
yaz("TeknoTwit Yükseklik Kaydedildi: " + $(this).val());
});
$('#twitSol').on('input', function() {
localStorage.setItem("twitSol", $(this).val());
yaz("Sol Sütun Kaydedildi: "+$(this).val());
});
$('#twitSag').on('input', function() {
localStorage.setItem("twitSag", $(this).val());
yaz("Sağ Sütun Kaydedildi: "+$(this).val());
});
$('#trollDay').on('input', function() {
localStorage.setItem("trollDay", $(this).val());
yaz("Troll Gün Kaydedildi: "+$(this).val());
});
$('#trollDo').on('input', function() {
localStorage.setItem("trollDo", $(this).val());
yaz("Troll İşlemi Kaydedildi: "+$(this).val());
});
$('#hortDay').on('input', function() {
localStorage.setItem("hortDay", $(this).val());
yaz("Hort Gün Kaydedildi: "+$(this).val());
});
$('#hortDo').on('input', function() {
localStorage.setItem("hortDo", $(this).val());
yaz("Hort İşlemi Kaydedildi: "+$(this).val());
});
$('#factoryReset').click(function() {
localStorage.clear();
yaz("Ayarlar Sıfırlandı");
setTimeout(function(){
location.reload();
},1000);
});
setInterval(function(){
if(document.getElementById("tab-izdirap").getAttribute("class")==="active"){
document.getElementById("profile_submit").setAttribute("onclick", "javascript:alert('BASMA DEDİK YA');alert('BASMASAN OLMAZDI DEMİ');alert('AL İŞTE BOZDUN');alert('KIRDIN KIRDIN');alert('MUTLU MUSUN?');alert('BEN DEĞİLİM...');alert('ÜZDÜN BENİ');alert('SANA DÜZGÜNCE BASMA DEDİK');alert('...');alert('AL SANA CEZA');window.location.replace('http://teknoizdirap.com');return false;");
}else{
document.getElementById("profile_submit").setAttribute("onclick", "");
}}, 500);
}
//======================AYARLAR SAYFASI SON======================//
//======================PROFİL SAYFASI======================//
if(location.pathname.startsWith('/u/')){
profilDiv = document.createElement('div');
profilDiv.id = 'profilDiv';
profilDiv.className = 'profilDivClass';
document.getElementsByClassName('pull-right')[0].appendChild(profilDiv);
profilDiv.innerHTML = "<div style='font-size: 18px;' class='checkbox'><label><input style='transform: scale(1.5);' id='profilBox' type='checkbox' autocomplete='off'>Diğer Kişileri Gizle</label></div>";
document.getElementById("profilBox").checked = profilAktif;
$('#profilBox').click(function() {
var profilBox = document.getElementById("profilBox");
profilAktif=profilBox.checked;
localStorage.setItem("profilAktif", profilAktif);
profil();
});
}
//======================PROFİL SAYFASI SON======================//
//======================BİLDİRİM======================//
bildirimSon=0;
bildirimSayi=0;
setInterval(function(){
bildirimSon=bildirimSayi;
bildirimStr=$('#bildirim-count').text();
if(bildirimStr && bildirimStr.length>0){
bildirimSayi = 0 + parseInt(bildirimStr);
}else{
bildirimSayi = 0;
}
if(bildirimSayi!=bildirimSon) localStorage.setItem("bildirimSayi", bildirimSayi);
preTitle="";
if(bildirimSayiDepo>0){
preTitle = "[" + bildirimSayiDepo + "] ";
}
//titleSayi=document.title.substring(document.title.lastIndexOf("[")+1,document.title.lastIndexOf("]"));
if(bildirimSayiDepo>0 && bildirimSayiDepo>bildirimSon && bildirimAlertAktif) alert(bildirimSayiDepo + " Adet Bildirim Var");
if(bildirimSayiDepo>0 && bildirimTitleAktif && document.title.indexOf(preTitle) < 0){
for(m=1;m<=100;m++){
document.title = document.title.replace("["+m+"]","");
}
document.title = preTitle+document.title;
}
if(bildirimSayiDepo<1 && document.title.indexOf(preTitle) >= 0){
for(m=1;m<=100;m++){
document.title = document.title.replace("["+m+"]","");
}
}
//console.log(bildirimSayiDepo);
}, 1000);
//======================BİLDİRİM SON======================//
//======================ÜYELİK TARİHİ======================//
if(uyelikTarihiAktif || trollSavarAktif || durumSayisiAktif || yorumSayisiAktif || rutbeAktif){
var dd = new Date();
var nn = dd.getTime();
if(localStorage.getItem("uyeJson") && nn/1000-JSON.parse(localStorage.getItem("uyeJson"))["update"]<2*3600){
window.uyeDetayJson = JSON.parse(localStorage.getItem("uyeJson"));
uyeDetayJsonLoaded=true;
}else{
$.get('https://api.myjson.com/bins/ku84j', function (data, textStatus, jqXHR) {
var jsons = JSON.stringify(data);
window.uyeDetayJson = JSON.parse(jsons);
if(uyeDetayJson){
uyeDetayJsonLoaded=true;
localStorage.setItem("uyeJson", jsons);
}
});
}
}
//======================ÜYELİK TARİHİ SON======================//
//======================KEŞFET======================//
if(location.pathname == "/") {
if(teknoTwitAktif && (twitSag=="Keşfet" || twitSol=="Keşfet")){
if(colRight && twitSag=="Keşfet"){
$('#twitSag').load('https://teknoseyir.com/kesfet #col-left > *');
$('#twitSag').width('300px');
$('#twitSag').attr('class','kesfet');
}
if(colLeft && twitSol=="Keşfet"){
$('#twitSol').load('https://teknoseyir.com/kesfet #col-left > *');
$('#twitSol').width('300px');
$('#twitSol').attr('class','kesfet');
}
$(".kesfet").css("float","left");
$(".kesfet").css("padding","10px");
$(".kesfet").css("padding","10px");
if(darkMode){
$('.kesfet').addClass('kesfetDark');
}else{
$('.kesfet').addClass('kesfetLight');
}
var style = $('<style>.kesfet article {display: block; padding: 10px; min-height: 50px; position: relative; border: 1px solid; border-radius: 3px; margin: 10px 0;}</style>');
var darkStyle = $('<style>.kesfetDark article {background-color:#333;border-color: #373737;} .kesfetDark h1 a{color: #bbb;}</style>');
var lightStyle = $('<style>.kesfetLight article {background-color:#fff;border-color: #e5e6e9 #dfe0e4 #d0d1d5;} .kesfetLight h1 a{color: #333;}</style>');
$('html > head').append(style);
$('html > head').append(darkStyle);
$('html > head').append(lightStyle);
}
}
}
//======================KEŞFET SON======================//
//======================FONT BUTONLAR======================//
button();
$('#fontadd').click(function() {
fontSize+=2;
localStorage.setItem('fontSize',fontSize);
yaz("Font boyutu artırıldı: " + fontSize);
font();
});
$('#fontmin').click(function() {
fontSize-=2;
localStorage.setItem('fontSize',fontSize);
yaz("Font boyutu azaltıldı: " + fontSize);
font();
});
//======================FONT BUTONLAR SON======================//
//======================SPOILER======================//
var spoilerStyle = $('<style>'+
'.spoiler {cursor: pointer;}'+
'.spoiler.on { color: rgba(0,0,0,0); text-shadow: 0 0 10px grey; } ' +
'.spoiler.on a{ color: rgba(0,0,0,0); text-shadow: 0 0 10px #23527c; } ' +
'.spoiler.on img{ filter: blur(25px); -moz-filter: blur(25px);} ' +
'</style>');
$('html > head').append(spoilerStyle);
$(document).on('click', '.spoiler', function() {
$(this).toggleClass('on');
});
//======================SPOILER SON======================//
//======================RESULT DIV======================
$("body").append("<div style='z-index:10000;position:fixed;right:10px;top:50px;font-size:24px;font-weight:bold;' id ='result'></div>");
resultDiv= document.getElementById("result");
//======================RESULT DIV SON======================
};