Created
September 29, 2013 19:57
-
-
Save ayberk/6755947 to your computer and use it in GitHub Desktop.
eksi sozluk'te en begenilen entryleri okumayi kolaylastiran hede
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Eksi Begenilenler | |
// @namespace 127.0.0.1 | |
// @version 0.1 | |
// @description En begenilenleri ayni sayfada gor | |
// @match https://eksisozluk.com/istatistik/dunun-en-begenilen-entryleri | |
// @match https://eksisozluk.com/istatistik/gecen-haftanin-en-begenilen-entryleri | |
// @match https://eksisozluk.com/istatistik/tsllbnnin-formulu | |
// @require http://code.jquery.com/jquery-latest.js | |
// ==/UserScript== | |
function append(thisItem, url) | |
{ | |
$.get(url, function(data) { | |
var x = $(data).find('div.content').html(); | |
thisItem.append("<ol id='entry-list'><li><article data-menu-attached='true'>" | |
+ "<div id='topic' class='content' itemprop='articleBody text'>" | |
+ x +"</div>"+"</article></li></ol>"); | |
$('a.b').css({"display":"inline"}); | |
$('a.url').css({"display":"inline"}); | |
$('sup').find('a').css({"display":"inline"}); | |
}); | |
} | |
$(document).ready( | |
function() | |
{ | |
var list = $('#stats'); | |
var items = list.find('li'); | |
var i = 0; | |
items.each( | |
function() { | |
var thisItem = $(this); | |
var url = $(this).find("a").attr('href'); | |
thisItem.append("<div id='goster' class='options'><a class='button'> Goster/Gizle </a></div>"); | |
var down=0; | |
thisItem.find('#goster').click( | |
function() | |
{ | |
if(down == 1) | |
{ | |
thisItem.find('#entry-list').css({"display":"none"}); | |
down = 0; | |
} | |
else | |
{ | |
var list = thisItem.find('#entry-list'); | |
if(!list.length) | |
append(thisItem,url); | |
thisItem.find('#entry-list').css({"display":"inline-block"}); | |
down = 1; | |
} | |
}); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment