Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $(document).ready(function() {
- var ShillCount = 0;
- var UUIDs = 0;
- var ThreadPosts = 0;
- var ShowingPosts = 0;
- var BreadQuality = 0;
- var LastThreadPosts = 0;
- var UUID_DB = {}
- var UUID_POST_COUNT = {}
- var POST_REPLIES = {}
- var SHILL_SCORE = {}
- var SHILL_DB = {}
- var MY_POSTS = {};
- var BAD_POSTS = {};
- var GOOD_POSTS = {};
- var POSTS_SCORE = {};
- var POST_TO_ANON = {};
- var TOP_ANONS = [];
- var TOP_POSTS = [];
- var TOP_NOTABLES = [];
- var NOTABLES_MAP = {};
- var MY_SCORE = 0;
- var BAKER = $('.op').find('.poster_id').text();
- var Subject = $('.op').find('.subject').text().split(' ');
- var BREAD_ID = 0;
- var BREAD_DATE = parseInt($('.op').find('time').attr('unixtime'));
- var LAST_DATE = BREAD_DATE;
- for (var n = 0; n < Subject.length; n++) {
- if (Subject[n].startsWith('#')) {
- BREAD_ID = parseInt(Subject[n].substr(1, Subject[n].length - 1));
- }
- }
- var LastIdFocus = "";
- var LastIdIndex = 0;
- function ApplyFilter() {
- browser.storage.local.get(['filter'], function(result) {
- var FILTER_ON = true;
- if ( result.filter === undefined){
- browser.storage.local.set({'filter': true}, function() {});
- }
- else {
- FILTER_ON = result.filter;
- }
- var Intros = $('.intro');
- for (var n = 0; n < Intros.length; n++) {
- if ($(Intros[n]).find('.poster_id').text() in SHILL_DB) {
- $(Intros[n]).parent().css('background-color', '#7b7b7b');
- if (FILTER_ON){
- $(Intros[n]).parent().hide();
- $(Intros[n]).parent().next().hide();
- }
- else {
- $(Intros[n]).parent().show();
- $(Intros[n]).parent().next().show();
- }
- }
- }
- });
- }
- function GetNotables() {
- var Intros = $('.intro');
- NOTABLES_MAP = {};
- for (var n = 0; n < Intros.length; n++) {
- if ($(Intros[n]).find('.poster_id').text() == BAKER) {
- var BodyText = $(Intros[n]).parent().find('.body').text().toLowerCase();
- if (BodyText.includes('#' + BREAD_ID) || BodyText.includes('#' + (BREAD_ID+1))) {
- var Lines = $(Intros[n]).parent().find('.body').find('p.body-line.ltr');
- for (var l = 0; l < Lines.length; l++) {
- var Line = $(Lines[l]).find('a')
- if (Line.length > 0) {
- var post_id = parseInt($(Line[0]).text().substr(2));
- if (post_id in GOOD_POSTS) {
- NOTABLES_MAP[post_id] = 0;
- if (post_id in POSTS_SCORE) {
- NOTABLES_MAP[post_id] = POSTS_SCORE[post_id];
- }
- }
- }
- }
- }
- }
- }
- }
- function CleanAnonsFromShills(){
- for (shill in SHILL_DB){
- delete UUID_DB[shill];
- }
- for (post in POST_TO_ANON){
- if (POST_TO_ANON[post] in SHILL_DB){
- delete POSTS_SCORE[post];
- }
- }
- }
- function CalcTop() {
- CleanAnonsFromShills();
- TOP_ANONS = [];
- var sorted = Object.keys(UUID_DB) //Create a list from the keys of your map.
- .sort( //Sort it ...
- function(a, b) { // using a custom sort function that...
- // compares (the keys) by their respective values.
- return UUID_DB[b] - UUID_DB[a];
- });
- for (var s = 0; s < sorted.length && s < 10; s++) {
- TOP_ANONS.push([sorted[s], UUID_DB[sorted[s]]]);
- }
- TOP_POSTS = [];
- var sorted = Object.keys(POSTS_SCORE) //Create a list from the keys of your map.
- .sort( //Sort it ...
- function(a, b) { // using a custom sort function that...
- // compares (the keys) by their respective values.
- return POSTS_SCORE[b] - POSTS_SCORE[a];
- });
- for (var s = 0; s < sorted.length && s < 10; s++) {
- TOP_POSTS.push([sorted[s], POSTS_SCORE[sorted[s]]]);
- }
- TOP_MY = [];
- var sorted = Object.keys(MY_POSTS) //Create a list from the keys of your map.
- .sort( //Sort it ...
- function(a, b) { // using a custom sort function that...
- // compares (the keys) by their respective values.
- return MY_POSTS[b] - MY_POSTS[a];
- });
- for (var s = 0; s < sorted.length && s < 10; s++) {
- TOP_MY.push([sorted[s], MY_POSTS[sorted[s]]]);
- }
- TOP_NOTABLES = [];
- var sorted = Object.keys(NOTABLES_MAP) //Create a list from the keys of your map.
- .sort( //Sort it ...
- function(a, b) { // using a custom sort function that...
- // compares (the keys) by their respective values.
- return NOTABLES_MAP[b] - NOTABLES_MAP[a];
- });
- for (var s = 0; s < sorted.length && s < 10; s++) {
- TOP_NOTABLES.push([sorted[s], NOTABLES_MAP[sorted[s]]]);
- }
- }
- function FloatingStats() {
- browser.storage.local.get(['filter'], function(result) {
- var FILTER_ON = true;
- if ( result.filter === undefined){
- browser.storage.local.set({'filter': true}, function() {});
- }
- else {
- FILTER_ON = result.filter;
- }
- $('.thread').find('.floating-menu').remove();
- //var NavHTML = '<nav class="floating-menu" style="font-family: sans-serif;background: #33434a;padding: 5px;width: 15%;z-index: 100;position: fixed;right: 0;top: 0;margin-top: 20px;margin-right: 10px;border-radius: 5px;display: block;font-size: 10px;font-family: monospace;color: #fff;">';
- ThreadPosts = parseInt($('#thread_stats_posts').text());
- UUIDs = parseInt($('#thread_stats_uids').text());
- var Posts = $('.post');
- ShowingPosts = -1;
- for (var n = 0; n < Posts.length; n++) {
- if ($(Posts[n]).css('display') != 'none') {
- ShowingPosts++;
- }
- }
- ShillCount = Object.keys(SHILL_DB).length;
- var NavHTML = '<nav class="floating-menu" style="font-family: sans-serif;background: #33434a;padding: 5px;width: 15%;z-index: 100;position: fixed;right: 0;top: 0;margin-top: 20px;margin-right: 10px;border-radius: 5px;display: block;font-size: 10px;font-family: monospace;color: #fff;">';
- NavHTML += '<div id="overflower" style="overflow:auto">';
- NavHTML += '<table style="width: 100%;">';
- NavHTML += '<tbody>';
- NavHTML += '<tr style="background-color: #33434a;"><td style="font-size: 10px;color: #fdf39e;font-weight: bold;">BREAD STATUS</td><td>' + BreadLifetime() + '</td><td>#' + BREAD_ID + '</td></tr>';
- NavHTML += '</tbody>';
- NavHTML += '</table>';
- NavHTML += '<div id="myProgress" style="width: 100%;background-color: grey;border-radius: 3px;">';
- NavHTML += '<div id="inner-bar" style="border-radius: 3px;background-color: #ac0;width: ' + parseInt((ThreadPosts / 751) * 100) + '%;transition: width .5s ease-in;height: 15px;background-size: 18px 18px;box-shadow: inset 0px 2px 8px rgba(255, 255, 255, .5), inset -1px -1px 0px rgba(0, 0, 0, .2);"></div>';
- NavHTML += '</div>';
- NavHTML += '<table style="width: 100%;"><tbody>';
- NavHTML += '<tr style="background-color: #33434a;"><td style="width: 78%;">TOTAL POSTS: </td><td style="font-weight: bold;">' + ThreadPosts + '</td></tr>';
- if (FILTER_ON){
- NavHTML += '<tr style="background-color: #33434a;"><td style="width: 75%;">FILTERED POSTS:</td><td style="color: #f74b3e;font-weight: bold;">' + parseInt((ThreadPosts - ShowingPosts)) + '</td></tr>';
- }
- else {
- NavHTML += '<tr style="background-color: #33434a;"><td style="width: 75%;">FILTERED POSTS:</td><td style="color: #f74b3e;font-weight: bold;">0</td></tr>';
- }
- NavHTML += '<tr style="background-color: #33434a;"><td style="width: 75%;">EST. SHILL COUNT:</td><td style="color: #f74b3e;font-weight: bold;">' + ShillCount + '</td></tr>';
- NavHTML += '<tr style="background-color: #33434a;"><td style="width: 75%;">EST. ANON COUNT:</td><td style="font-weight: bold;">' + (UUIDs - ShillCount) + '</td></tr>';
- NavHTML += '<tr style="background-color: #33434a;"><td style="width: 75%;">BREAD QUALITY:</td><td style=" color: #8BC34A; font-weight: bold; ">' + BreadQuality + '</td></tr>';
- NavHTML += '<tr style="background-color: #33434a;"><td style="width: 75%;">BAKER:</td><td style=" color: #c5d406; font-weight: bold;cursor:pointer" class="idfocus">' + BAKER + '</td></tr>';
- if (TOP_MY.length > 0) {
- NavHTML += '<tr style="background-color: #33434a;"><td style="width: 75%;font-size: 10px;color: #fdf39e;font-weight: bold;">YOUR SCORE:</td><td style="font-weight: bold;color: #8BC34A;">' + MY_SCORE + '</td></tr>';
- }
- NavHTML += '</tbody></table>';
- if (TOP_MY.length > 0) {
- NavHTML += '<h3 style="font-size: 10px;display: block;margin: 2px;color: #fdf39e;">YOUR TOP POSTS</h3>';
- NavHTML += '<table style="width: 100%;"><thead><tr><td>Post No.</td><td>SCORE</td></tr></thead>';
- NavHTML += '<tbody>';
- for (var n = 0; n < TOP_MY.length; n++) {
- NavHTML += '<tr style="background-color: #33434a;"><td style="width: 50%;color: #fcd;cursor:pointer" class="postfocus">' + TOP_MY[n][0] + '</td><td style="font-weight: bold;color: #8BC34A;">' + TOP_MY[n][1] + '</td></tr>';
- }
- NavHTML += '</tbody></table>';
- }
- if (TOP_NOTABLES.length > 0) {
- NavHTML += '<h3 style="font-size: 10px;display: block;margin: 2px;color: #fdf39e;">TOP 10 NOTABLES</h3>';
- NavHTML += '<table style="width: 100%;"><thead><tr><td>Post No.</td><td>POSTER</td><td>SCORE</td></tr></thead>';
- NavHTML += '<tbody>';
- for (var n = 0; n < TOP_NOTABLES.length; n++) {
- if ( TOP_NOTABLES[n][1] > 0){
- NavHTML += '<tr style="background-color: #33434a;"><td style="width: 50%;color: #fcd;cursor:pointer" class="postfocus">' + TOP_NOTABLES[n][0] + '</td><td style="color: #bcedfd;cursor:pointer" class="idfocus">' + POST_TO_ANON[TOP_NOTABLES[n][0]] + '</td><td style="font-weight: bold;color: #8BC34A;">' + TOP_NOTABLES[n][1] + '</td></tr>';
- }
- }
- NavHTML += '</tbody></table>';
- }
- if (TOP_POSTS.length > 0) {
- NavHTML += '<h3 style="font-size: 10px;display: block;margin: 2px;color: #fdf39e;">TOP 10 POSTS</h3>';
- NavHTML += '<table style="width: 100%;"><thead><tr><td>Post No.</td><td>POSTER</td><td>SCORE</td></tr></thead>';
- NavHTML += '<tbody>';
- for (var n = 0; n < TOP_POSTS.length; n++) {
- if ( TOP_POSTS[n][1] > 0){
- NavHTML += '<tr style="background-color: #33434a;"><td style="width: 50%;color: #fcd;cursor:pointer" class="postfocus">' + TOP_POSTS[n][0] + '</td><td style="color: #bcedfd;cursor:pointer" class="idfocus">' + POST_TO_ANON[TOP_POSTS[n][0]] + '</td><td style="font-weight: bold;color: #8BC34A;">' + TOP_POSTS[n][1] + '</td></tr>';
- }
- }
- NavHTML += '</tbody></table>';
- }
- NavHTML += '<h3 style="font-size: 10px;display: block;margin: 2px;color: #fdf39e;">TOP 10 ANONS</h3>';
- NavHTML += '<table style="width: 100%;"><thead><tr><td>ID</td><td>POSTS</td><td>SCORE</td></tr></thead>';
- NavHTML += '<tbody>';
- for (var n = 0; n < TOP_ANONS.length; n++) {
- if ( TOP_ANONS[n][1] > 0){
- NavHTML += '<tr style="background-color: #33434a;"><td style="width: 50%;color: #bcedfd;cursor:pointer" class="idfocus">' + TOP_ANONS[n][0] + '</td><td style="font-weight: bold;">' + UUID_POST_COUNT[TOP_ANONS[n][0]] + '</td><td style="font-weight: bold;color: #8BC34A;">' + TOP_ANONS[n][1] + '</td></tr>';
- }
- }
- NavHTML += '</tbody>';
- NavHTML += '</table><br> ';
- NavHTML += '<table style="width:100%"><tbody><tr>';
- NavHTML += '<td style="width:33%"><a href="https://8ch.net/qresearch/catalog.html" style="font-size: 10px;display: block;margin: 2px;text-align: center;color:#fff;text-decoration: none;">◀ CATALOG</a></td>';
- NavHTML += '<td style="width:33%"><a href="#bottom" style="font-size: 10px;display: block;margin: 2px;text-align: center;color:#fdf39e;text-decoration: none;">▼ BOTTOM ▼</a></td>';
- NavHTML += '<td style="width:33%"><a href="https://8ch.net/patriotsfight/catalog.html" style="font-size: 10px;display: block;margin: 2px;text-align: center;color:#fff;text-decoration: none;">PF ▶</a></td>';
- NavHTML += '<tr></tbody></table>';
- NavHTML += '</div>';
- NavHTML += '</nav>';
- $('.thread').prepend(NavHTML);
- $('#overflower').css('max-height',($(window).height()-50) + 'px');
- $(".postfocus").on("click", function() {
- var Bodies = $('.post').find('.body');
- for (var n = 0; n < Bodies.length; n++) {
- if ($(Bodies[n]).parent().find('.post_no').text().substr(3) == $(this).text()) {
- $([document.documentElement, document.body]).animate({
- scrollTop: $($(Bodies[n])).offset().top - 350
- }, 400);
- $($(Bodies[n])).parent().fadeTo(100, 1).fadeTo(100, 0.5).fadeTo(100, 1).fadeTo(100, 0.5).fadeTo(100, 1).fadeTo(100, 1).fadeTo(100, 0.5).fadeTo(100, 1).fadeTo(100, 0.5).fadeTo(100, 1);
- break;
- }
- }
- });
- $(".idfocus").on("click", function() {
- var Scrolled = false;
- var Bodies = $('.post').find('.body');
- for (var n = LastIdIndex; n < Bodies.length; n++) {
- if (LastIdFocus != $(this).text()) {
- LastIdFocus = $(this).text();
- n = 0;
- }
- if ($(Bodies[n]).parent().find('.poster_id').text() == $(this).text()) {
- LastIdFocus = $(this).text();
- if (n < Bodies.length) {
- Scrolled = true;
- $([document.documentElement, document.body]).animate({
- scrollTop: $($(Bodies[n])).offset().top - 350
- }, 400);
- LastIdIndex = (n + 1);
- $($(Bodies[n])).parent().fadeTo(100, 1).fadeTo(100, 0.5).fadeTo(100, 1).fadeTo(100, 0.5).fadeTo(100, 1).fadeTo(100, 1).fadeTo(100, 0.5).fadeTo(100, 1).fadeTo(100, 0.5).fadeTo(100, 1);
- }
- break;
- }
- }
- if (!Scrolled) {
- LastIdIndex = 0;
- for (var n = LastIdIndex; n < Bodies.length; n++) {
- if (LastIdFocus != $(this).text()) {
- LastIdFocus = $(this).text();
- n = 0;
- }
- if ($(Bodies[n]).parent().find('.poster_id').text() == $(this).text()) {
- LastIdFocus = $(this).text();
- if (n < Bodies.length) {
- Scrolled = true;
- $([document.documentElement, document.body]).animate({
- scrollTop: $($(Bodies[n])).offset().top - 350
- }, 400);
- LastIdIndex = (n + 1);
- $($(Bodies[n])).parent().fadeTo(100, 1).fadeTo(100, 0.5).fadeTo(100, 1).fadeTo(100, 0.5).fadeTo(100, 1).fadeTo(100, 1).fadeTo(100, 0.5).fadeTo(100, 1).fadeTo(100, 0.5).fadeTo(100, 1);
- }
- break;
- }
- }
- }
- });
- });
- }
- function NiceDesign() {
- $('.fileinfo').hide();
- $('hr').hide();
- $('.post').css('width', '80%');
- $('.post').css('border-radius', '6px');
- $('.post').css('border-width', '1px');
- $('.post').css('border-color', '#acc2cc');
- $('.post').css('border-style', 'solid');
- $('.post').css('padding', '10px');
- $('.post-image').css('border-radius', '10px');
- $('.op').css('background', '#ffffff');
- $('.op').css('padding', '20px');
- $('.op').css('width', '95%');
- $('time').css('color', '#000000');
- $('.post_no').css('color', '#f56017');
- $('.post_no').css('font-weight', 'bold');
- $('.poster_id').css('font-weight', 'bold');
- $('.poster_id').css('color', '#0035ff');
- }
- function BreadLifetime() {
- var Total = (LAST_DATE - BREAD_DATE);
- var Hours = Math.floor(Total / 3600);
- var Minutes = (Math.floor(Total / 60)) % 60;
- var Result = "";
- if (Hours > 0) {
- Result += Hours + "h ";
- }
- Result += Minutes + "m ";
- Result += (Total % 60) + "s ";
- return Result;
- }
- function SimpleShillFinder() {
- SHILL_SCORE = {};
- UUID_DB = {};
- SHILL_DB = {};
- var Intros = $('.intro');
- for (var n = 0; n < Intros.length; n++) {
- //if( typeof ID !== 'undefined'){
- // POST_TO_ANON[$(Intros[n]).find('.post_no').text().substr(3)] = ID;
- //}
- while ($(Intros[n]).find('.poster_id').text() == BAKER){
- POST_TO_ANON[$(Intros[n]).find('.post_no').text().substr(3)] = BAKER;
- n++; // Skipping baker
- }
- var ID = $(Intros[n]).find('.poster_id').text();
- POST_TO_ANON[$(Intros[n]).find('.post_no').text().substr(3)] = ID;
- var Score = 0;
- if (ID != "") {
- if (ID in SHILL_DB){
- BAD_POSTS[$(Intros[n]).find('.post_no').text().substr(3)] = ID;
- }
- else {
- UUID_DB[ID] = 0;
- if ($(Intros[n]).find('.name').text() != "Anonymous" && $(Intros[n]).find('.name').text() != "Q" && $(Intros[n]).find('.name').text() != "" && $(Intros[n]).find('.name').text() != "Q " && $(Intros[n]).find('.name').text() != "Anonymous (You)") {
- //console.log(ID + " : Namefag");
- Score++;
- }
- if ($(Intros[n]).parent().find('.video-container-hooktube').length > 0) {
- //console.log(ID + " : Hooktube");
- Score++;
- }
- if ($(Intros[n]).parent().find('span.heading').length > 0) {
- var RedTexts = $(Intros[n]).parent().find('span.heading');
- var TotalLength = 0;
- for (var r = 0; r < RedTexts.length; r++) {
- TotalLength += $(RedTexts[r]).text().length;
- }
- if (TotalLength > 1000) {
- Score++;
- }
- }
- var BodyText = $(Intros[n]).parent().find('.body').text();
- if (BodyText.length - BodyText.replace(/[A-Z]/g, '').length > 1000) {
- Score++;
- }
- if ($(Intros[n]).find('.mentioned').children().length > 3) {
- $(Intros[n]).parent().css('background-color', '#ffdada');
- }
- var PostCount = $(Intros[n]).find('.posts_by_id').text();
- UUID_POST_COUNT[$(Intros[n]).find('.poster_id').text()] = parseInt(PostCount.substr(2, PostCount.length - 2))
- if($(Intros[n]).find('.capcode').text() == "## Board Owner" || $(Intros[n]).find('.name').text() == "Q" || $(Intros[n]).find('.name').text() == "Q " ){
- Score = 0;
- }
- if (Score > 0) {
- SHILL_DB[ID] = 0;
- SHILL_SCORE[ID] = Score+1;
- BAD_POSTS[$(Intros[n]).find('.post_no').text().substr(3)] = ID;
- //BanID(Intros[n]);
- }
- else {
- GOOD_POSTS[$(Intros[n]).find('.post_no').text().substr(3)] = ID;
- }
- }
- }
- };
- LAST_DATE = parseInt($(Intros[Intros.length - 1]).find('time').attr('unixtime'));
- }
- function AdvancedShillFinder(){
- var Intros = $('.intro');
- for (var n = 0; n < Intros.length; n++) {
- if (UUID_POST_COUNT[$(Intros[n]).find('.poster_id').text()] > 6){
- if(UUID_DB[$(Intros[n]).find('.poster_id').text()] == 0 || UUID_POST_COUNT[$(Intros[n]).find('.poster_id').text()] > 4*UUID_DB[$(Intros[n]).find('.poster_id').text()] ){
- SHILL_DB[$(Intros[n]).find('.poster_id').text()] = 0;
- }
- }
- }
- }
- function CalcAllPosts(){
- var Intros = $('.intro');
- for (var n = 0; n < Intros.length; n++) {
- var ID = $(Intros[n]).find('.poster_id').text();
- var Quotes = $(Intros[n]).parent().find('.body').find('a');
- var uniq = {};
- for (var q = 0; q < Quotes.length; q++) {
- uniq[Quotes[q].innerText.substr(2)] = true;
- }
- for (u in uniq) {
- if (u in BAD_POSTS) {
- UUID_DB[ID] -= 3;
- $(Intros[n]).css("opacity", "0.6");
- }
- }
- var Replies = $(Intros[n]).find('.mentioned').children();
- POST_REPLIES[ID] = $(Intros[n]).find('.mentioned').children().length;
- for (var r = 0; r < Replies.length; r++) {
- var post_id = $(Replies[r]).text().substr(2);
- if (post_id in GOOD_POSTS && GOOD_POSTS[post_id] != ID) {
- UUID_DB[ID]++;
- if ($(Intros[n]).find('.post_no').text().substr(3) in POSTS_SCORE) {
- //POST_TO_ANON[$(IDs[n]).parent().parent().find('.post_no').text().substr(3)] = ID;
- POSTS_SCORE[$(Intros[n]).find('.post_no').text().substr(3)]++;
- } else {
- //POST_TO_ANON[$(IDs[n]).parent().parent().find('.post_no').text().substr(3)] = ID;
- POSTS_SCORE[$(Intros[n]).find('.post_no').text().substr(3)] = 1;
- }
- }
- }
- }
- }
- browser.storage.local.get(['filter'], function(result) {
- if ( result.filter === undefined){
- browser.storage.local.set({'filter': true}, function() {});
- }
- else {
- }
- });
- function start() {
- browser.storage.local.get(['plugin'], function(result) {
- var PLUGIN_ON = true;
- if ( result.plugin === undefined){
- browser.storage.local.set({'plugin': true}, function() {});
- }
- else {
- PLUGIN_ON = result.plugin;
- }
- if(PLUGIN_ON){
- setTimeout(function() {
- if (LastThreadPosts != $('#thread_stats_posts').text()) {
- LastThreadPosts = $('#thread_stats_posts').text();
- ShillCount = 0;
- UUIDs = 0;
- ThreadPosts = 0;
- ShowingPosts = 0;
- BreadQuality = 0;
- UUID_DB = {}
- UUID_POST_COUNT = {}
- POST_REPLIES = {}
- SHILL_SCORE = {}
- SHILL_DB = {}
- MY_POSTS = {};
- BAD_POSTS = {};
- GOOD_POSTS = {};
- POSTS_SCORE = {};
- POST_TO_ANON = {};
- TOP_ANONS = [];
- TOP_POSTS = [];
- TOP_NOTABLES = [];
- NOTABLES_MAP = {};
- MY_SCORE = 0;
- NiceDesign();
- SimpleShillFinder();
- CalcAllPosts();
- AdvancedShillFinder();
- GetNotables();
- CalcTop();
- ApplyFilter();
- AnonCount = Object.keys(UUID_DB).length;
- ShillCount = Object.keys(SHILL_DB).length;
- PostSum = 0;
- for (var v = 0; v < TOP_POSTS.length; v++) {
- PostSum += TOP_POSTS[v][1];
- }
- BreadQuality = parseInt(((AnonCount / (AnonCount + ShillCount)) * 10) * PostSum);
- FloatingStats();
- }
- start();
- // Every 3 sec
- }, 1000);
- }
- });
- }
- browser.storage.local.get(['plugin'], function(result) {
- var PLUGIN_ON = true;
- if ( result.plugin === undefined){
- browser.storage.local.set({'plugin': true}, function() {});
- }
- else {
- PLUGIN_ON = result.plugin;
- }
- if(PLUGIN_ON){
- if (!$('#auto_update_status').is(':checked')) {
- $('#auto_update_status').click();
- }
- start();
- }
- });
- $( window ).resize(function() {
- $('#overflower').css('max-height',$(window).height()-50 + 'px');
- });
- });
Advertisement
Add Comment
Please, Sign In to add comment