// ==UserScript==
// @name booksru filter
// @description Mark already bought books in the list
// @include *www.books.ru/*
// ==/UserScript==
(function() {
var BooksList ='613827,614053,650905,650997,722548,3579377,3642686,3642693,3642711,3642717,3642718,3642719,3642720,3642723,3642756,3642758,3642759,3642768,3642772,3642780,3642801,3642895,3642901,3642982,3643028,3643030,3643058,3643059,3643090,3643091,3643093,3643094,3643103,3643123,3643125,3643169,3643195,3643198,3643218,3643231,3643290,3643303,3643327,3643333,3643336,3643462,3643463,3643471,3643498,549199,552089,552090,552091,552092,552093,552094,565563,594917,594918,595118,595168,595169,595214,595320,595356,595401,595405,595750,595751,595867,595870,595871,595876,595877,595893,595920,612331,612332,612333,612334,612335,612336,612337,612338,612339,612341,612342,612343,613826,613828,613829,614054,614055,614056,614057,614058,614059,614062,614063,623536,626971,626973,626974,626975,626976,626977,626979,626980,626981,626982,635609,635610,635613,635614,635615,645989,646105,646106,646542,646592,646597,646624,646639,650978,650998,651000,651521,651522,651523,651524,651525,651527,651529,651530,651531,651534,651536,651985,653087,653111,656602,663349,663350,667878,667884,667885,668993,683150,694938,699722,701827,702046,702048,704253,714878,714879,818144,818167,818173,818174,818175,818176,818177,818178,818268,818269,818328,818329,818330,818331,818358,818359,818360,818361,818665,819509,821741,821959,821960,821961,864681,864682,864707,864708,864709,864710,864711,864712,864714,889705,1532377,1548145,1826701,3127808,3572251,3572252,3572253,3572254,3579376,3579382,3579398,3642651,3642653,3642654,3642655,3642656,3642658,3642659,3642662,3642663,3642664,3642665,3642666,3642668,3642673,3642674,3642677,3642682,3642683,3642684,3642687,3642691,3642695,3642697,3642698,3642700,3642701,3642702,3642703,3642706,3642710,3642712,3642721,3642724,3642725,3642732,3642735,3642738,3642740,3642743,3642745,3642746,3642747,3642750,3642751,3642754,3642755,3642757,3642761,3642762,3642763,3642765,3642766,3642767,3642769,3642774,3642775,3642779,3642781,3642782,3642784,3642786,3642789,3642793,3642794,3642796,3642800,3642803,3642806,3642807,3642808,3642809,3642811,3642813,3642814,3642820,3642828,3642831,3642833,3642834,3642836,3642837,3642841,3642842,3642846,3642850,3642851,3642854,3642856,3642857,3642859,3642860,3642861,3642862,3642863,3642864,3642868,3642873,3642874,3642875,3642877,3642878,3642880,3642881,3642882,3642888,3642889,3642890,3642891,3642897,3642898,3642903,3642904,3642905,3642906,3642908,3642909,3642910,3642911,3642913,3642915,3642916,3642917,3642918,3642919,3642920,3642921,3642926,3642928,3642929,3642932,3642933,3642934,3642935,3642940,3642941,3642942,3642944,3642946,3642947,3642948,3642950,3642951,3642952,3642955,3642956,3642957,3642961,3642963,3642964,3642971,3642972,3642974,3642976,3642983,3642984,3642985,3642986,3642987,3642988,3642989,3642990,3642993,3642994,3642998,3642999,3643000,3643001,3643002,3643004,3643006,3643007,3643012,3643013,3643015,3643018,3643019,3643020,3643022,3643024,3643026,3643027,3643029,3643031,3643032,3643033,3643034,3643036,3643038,3643039,3643042,3643044,3643045,3643051,3643052,3643054,3643055,3643056,3643061,3643066,3643069,3643070,3643073,3643074,3643075,3643078,3643079,3643083,3643084,3643085,3643087,3643092,3643097,3643098,3643099,3643101,3643102,3643105,3643106,3643108,3643114,3643118,3643119,3643120,3643121,3643127,3643128,3643130,3643131,3643133,3643135,3643137,3643138,3643139,3643140,3643141,3643142,3643143,3643146,3643148,3643151,3643152,3643155,3643160,3643161,3643162,3643163,3643165,3643167,3643170,3643171,3643172,3643173,3643177,3643179,3643180,3643182,3643188,3643189,3643190,3643191,3643193,3643196,3643199,3643200,3643201,3643202,3643206,3643207,3643208,3643210,3643214,3643216,3643217,3643220,3643225,3643227,3643229,3643233,3643236,3643237,3643238,3643240,3643241,3643242,3643245,3643247,3643249,3643250,3643251,3643253,3643254,3643255,3643256,3643258,3643259,3643260,3643261,3643262,3643263,3643264,3643265,3643266,3643270,3643271,3643273,3643279,3643280,3643282,3643283,3643285,3643286,3643287,3643288,3643291,3643292,3643293,3643296,3643297,3643298,3643299,3643300,3643301,3643304,3643305,3643306,3643309,3643310,3643317,3643318,3643319,3643321,3643323,3643324,3643325,3643328,3643331,3643332,3643334,3643335,3643337,3643345,3643348,3643351,3643354,3643355,3643357,3643358,3643359,3643360,3643423,3643425,3643426,3643427,3643428,3643431,3643432,3643433,3643435,3643436,3643437,3643439,3643441,3643442,3643443,3643444,3643446,3643447,3643450,3643451,3643453,3643460,3643467,3643468,3643469,3643470,3643472,3643473,3643474,3643475,3643476,3643477,3643478,3643479,3643480,3643481,3643482,3643486,3643487,3643488,3643490,3643494,3643495,3643496,3643499,3643501,3643502,3643504,3643506,3643507,3643508,3643509,3643513,3643515,3643516,3643517,3643518,3643519,3643520,3643522,3643523,3643528,3643529,3643530,3643531,3643533,3643535,3643539,3643540,3643542,3643543,3643545,3643546,3643547,3643549,3643550,3643551,3643552,3643553,3643554,3643555,3643556,3643557,3643558,3643559,3643560,3643561,3643562,3643563,3643565,3643570,3643573,3643574,3643577,3643580,3643581,3643582,3643583,3643587,3643589,3643591,3643592,3643593,3643598,3643599,3643601,3643602,3643603,3643605,3643607,3643608,3643609,3643610,3643611,3643612,3643613,3643615,3643618,3643619,3643620,3643621,3643622,3643702,3643703,3643704,3643705,3643706,3643707,3643708,3643709,3643710,3643711,3643712,3643713,3643714,3643715,3643717,3643718,3643719,3643720,3643721,3643722,3643723,3643724,3643725,3643727,3643728,3643729,3643731,3643732,3643733,3643734,3643735,3643736,3643738,3643739,3643740,3643741,3643742,3643743,3643744,3643745,3643747,3643748,3643749,3643750,3643751,3643752,3643753,3643754,3643756,3643757,3643758,3643759,3643762,3643763,3643764,3643766,3643767,3643768,3643769,3643771,3643772,3643773,3643774,3643775,3643776,3643777,3643778,3643779,3643782,3643783,3643785,3643787,3643788,3643789,3752470,3752472,3752473,3752474,3752475,3752476,3752477,3752478,3752481,3752482,3752483,3752484,3752490,3752491,3752492,3752494,3752495,3752496,3752497,3752498,3752499,3752502,3752503,3752504,3752505,3752507,3752508,3752509,3752511,3752513,3752514,3752517,3752518,3752519,3752520,3752521,3752522,3752523,3752526,3752528,3752529,3752530,3752531,3752532,3752534,3977484,3977486,3977488,3977502,3977504,3977505,3977506,3977507,3977508,3977523,3977524,595752,595753,612340,614061,646622,651535,694941,714877,864715,3642672,3642675,3642681,3642716,3642729,3642730,3642742,3642770,3642771,3642773,3642778,3642783,3642798,3642804,3642805,3642812,3642823,3642912,3642914,3642924,3642927,3642931,3642936,3642958,3642965,3642973,3642975,3642981,3643003,3643025,3643047,3643077,3643104,3643110,3643134,3643158,3643176,3643197,3643212,3643223,3643224,3643226,3643243,3643268,3643269,3643289,3643295,3643307,3643311,3643316,3643350,3643430,3643438,3643452,3643461,3643465,3643484,3643492,3643510,3643526,3643534,3643536,3643537,3643538,3643564,3643567,3643569,3643575,3643578,3643585,3643590,3643600,3643604,3643614,3643617,3643726,3643730,3643737,3643746,3643755,3643760,3643761,3643765,3643770,3643781,3752471,3752486,3752487,3752489,3752500,3752501,3752506,3752510,3752512,3752515,3752516,3752525,3752527,3752533,595869,635608,635611,635616,651526,651532,683149,3642660,3642696,3642736,3642737,3642803,3642815,3642825,3642830,3642838,3642844,3642845,3642872,3642881,3642892,3642893,3642894,3642902,3642907,3642922,3642943,3642945,3642968,3642991,3643005,3643008,3643020,3643021,3643037,3643043,3643050,3643096,3643109,3643112,3643116,3643122,3643132,3643144,3643150,3643164,3643166,3643168,3643192,3643203,3643204,3643205,3643211,3643239,3643244,3643248,3643257,3643274,3643281,3643322,3643329,3643331,3643344,3643352,3643440,3643449,3643458,3643466,3643485,3643489,3643491,3643500,3643503,3643505,3643511,3643521,3643524,3643525,3643527,3643548,3643566,3643568,3643571,3643572,3643576,3643579,3643584,3643588,3643594,3643595,3643596,3643597,3643606,3643780,3643784,3752488,3752493,3752524,3977485,3977503';
var separator=',';
if ( BooksList.length!=0 )
{
var ignore_books = BooksList.split(separator);
var reg = "(" + ignore_books.join('|') + ")";
var regg = 'href="(.*?)'+reg+'/(.*?)"';
var regex=new RegExp('href="(.*?)'+reg+'/(.*?)"','i');
msgs = document.getElementsByClassName('title');
for (i=0; i<msgs.length; ++i)
if (regex.exec (msgs[i].innerHTML))
msgs[i].parentNode.parentNode.style.display='none';
}
})();
Список id-шек имеющихся книг можно получить следующим образом:
1) Заходите на предыдущий заказ, выделяете всё содержимое (от слова «товар» до «всего» внизу таблицы), сохраняете сырец как .html, и потом вот таким однострочником:
2) Потом вот таким однострочником:
cat pdf.txt | sed '/books\//!d;/file_type=pdf/!d;s/.*-//g;s/\/.*//g' | uniq
--
Электронные IT-книги по свободной цене на Books.ru / Хабрахабр