Anonymous ID: 41aeef July 6, 2022, 4:01 a.m. No.141718   πŸ—„οΈ.is πŸ”—kun

Welcome to Q Research General

 

We are researchers who deal in open-source information, reasoned argument, and dank memes. We do battle in the sphere of ideas and ideas only. We neither need nor condone the use of force in our work here.

 

"We hold these truths to be self-evident: that all men are created equal; that they are endowed by their Creator with certain unalienable rights; that among these are life, liberty, and the pursuit of happiness."

 

VINCIT OMNIA VERITAS | SEMPER FIDELIS | WWG1WGA | QRESEARCH

 

Q's Latest Posts

Wednesday 06.29.2022

>>16552853 ————————————–——– What is at stake? Who has control? SURPRISE WITNESS. Who is Cassidy Hutchinson? Trust the plan.

 

Saturday 06.25.2022

>>16521604 rt >>16520866, >>16521137 β€”β€” Established. (Who was "Jane Roe"? 50 years of conditioning.)

 

Friday 06.24.2022

>>16506930 ————————————–——– Are you ready to serve your country again? Remember your oath.

>>16505677 rt >>16505361 ———–––——–— It had to be done this way.

>>16504957 ————————————–——– Shall we play a game once more?

 

Q's Private Board

>>>/projectdcomms/ & Q's Trip-code: Q !!Hs1Jq13jV6

 

Find Q drops here

Main QAnon.pub - qresear.ch/q-posts - QAlerts.pub - operationQ.pub - QPosts.online - qanon.news/Q - 8kun.top/qresearch/qposts.html

Backups qntmpkts.keybase.pub - QAlerts.app - QAlerts.net - douknowq.com/134295/Q-Anon-Pub.htm - we-go-all.net/q.html -

 

QPosts Archives

* QMap & Mirrors PDF: SCRIBD: https://www.scribd.com/document/419874308/Q-Anon-The-Storm-X-VII?secret_password=55SQ1tCYhuNR8ESzm50u

* QPosts Archive, Players in the Game/ Analytics on Q posts & More: qmap.pub

* QPosts Archive, Searchable, interactive with user-explanations: qanon.pub qanon.app

* QPosts Archive + RSS, Searchable, Analytics, Offsite Bread Archive: qanon.news

* Spreadsheet QPosts Q&A and all images backup: https://docs.google.com/spreadsheets/d/1Efm2AcuMJ7whuuB6T7ouOIwrE_9S-1vDJLAXIVPZU2g

* Q Raw Text Dumps: q-clock.com/q_raw.txt

* Spreadsheet Timestamps/Deltas: docs.google.com/spreadsheets/d/1OqTR0hPipmL9NE4u_JAzBiWXov3YYOIZIw6nPe3t4wo/

* Memo & OIG Report Links: 8kun.top/qresearch/res/426641.html#427188

* Original, full-size images Q has posted: https://postimg.cc/gallery/29wdmgyze/

 

Q Research

Welcome

>>15406810, >>16085354 New here? Welcome | >>15406442 Board Info, Offsite Bunkers, Optics | >>15406807 Suggested Follow

 

Tools and Services

TOR Link: http://8kun.top.4o5xwl3fsmzwys7edqxtohvva6ikxc6h7wt7el4ar3d5om6k2zz7yaqd.onion/qresearch/catalog.html

>>15406428 Dough Resource Thread

>>15406802 Standard Infowar Procedures | >>15406811 Information Tools & Services

>>15406808 !!! LEARN DIGITAL WARFARE !!!

>>16093637 Q Encyclopedia by ArchiveAnon | >>16092925 Q Video Archive by ArchiveAnon

 

Join Us

>>15600441 !!! LEARN TO BAKE !!! | >>15406818 Iwo Jima YouTube Link

>>15406820 Meme Requests

Anonymous ID: 41aeef July 6, 2022, 4:02 a.m. No.141719   πŸ—„οΈ.is πŸ”—kun

GLOBALS

>>15487554 Use /tech/ for ban lifts & bug reports

>>15443568 HOW TO BAKE Thread; >>16087759 Newfag Q&A Thread; >>16050716 bakers & notetakers, plz tag the dough

>>16495621 CP guidelines: No Hunter near kids, use discernment with anything borderline

>>16538203 Baker's Lite JS code, can insert in Options menu, shows when Q posts (use discernment)

>>16514077, >>16552582, >>16511354 JW & BO on Q posting, Q's board, TOR, SALT, Tripcodes

>>16559261 OP formatting now that Q is posting

 

NOTABLES ARE NOT ENDORSEMENTS

 

#21020to be collected

 

#21019 board attacked by spammers

#21018 board attacked by spammers

#21017 board attacked by spammers

#21016 board attacked by spammers

#21015 board attacked by spammers

#21014 board attacked by spammers

#21013 board attacked by spammers

 

#21012

>>16606011 Former NAACP East president charged, suspected of stealing close to $194K

>>16606022, >>16606125, >>16606117, >>16606126, >>16606134, >>16606494 Ignoring this very real declaration won't stop it from happening. This is HUGE Kinney Texas Border Invasion Press Conference

>>16606025 Trump Sends Cease And Desist Demand To GOP Candidate

>>16606042, >>16606150 @airandspace #OTD in 1944, the first U.S. rocket-powered experimental military aircraft, MX-324

>>16606044, >>16606158 Q 2347

>>16606053 Bill Gates just won legal approval to buy 2,100 acres of North Dakota farmland

>>16606103, >>16606272, >>16606291, >>16606296, >>16606380 moar Highland Park

>>16606143 Cuccinelli discussion on declaration of invasion

>>16606208 @18airbornecorps Our Screaming Eagles πŸ¦… continue to flow into Europe in support of our @NATO

>>16606213 Did you know the NHS was born in Manchester 74 years ago today?

>>16606217, >>16606298 Democratic Rep. Jamaal Bowman accuses the Supreme Court of 'brazenly violating the Constitution

>>16606359 @SNMilitary Iran, Russia and China are preparing to hold a series of major military exercises in Latin America.

>>16606453 Gregg Phillips Announces Investigative Team Has Identified Unique Devices on Interest in Location of TCF Center Election Night Ballot Dump

>>16606467, >>16606482 An Irreversible Decision: Once You've Been Vaccinated, You Cannot Become Unvaccinated

>>16606594, >>16606600 Follow-up on the Bhavarian Illuminatti and the G7 [EAGLE'S NEST] Meeting

>>16606599 Qlock 44 On here

>>16606630 Jim Watkins enforces the deletion of /Hivemind/ posts [EMBRACE THE SUCK FAGGITS]

>>16606701 Data shows that number of solved murders across the nation is at its lowest in the last 50 years

>>16606737 #21012

Anonymous ID: 41aeef July 6, 2022, 4:02 a.m. No.141720   πŸ—„οΈ.is πŸ”—kun

#21011

>>16605230, >>16605238, >>16605278, >>16605416, >>16605576, >>16605579, >>16605825 IT'S GO-TIME! TEXAS DECLARES ALIEN INVASION [INFILTRATION]

>>16605582, >>16605524, >>16605539, >>16605661, >>16605716 now entering [B]RACKETTVILLE

>>16605243 Ethiopia, Sudan agree to border dispute dialogue

>>16605261, >>16605286 SOCKS SOCKS SOCKS

>>16605293 Alberta premier hopeful says Elon Musk’s StarLink could be used to bypass Trudeau’s internet censorship

>>16605299, >>16605334 If [SS] answers to the cabal, have they been holding our Presidents captive? 'Secret Service "protection" for life'

>>16605305 Dem Lawmakers Slam Biden's Plan to Sell F-16s to Turkey

>>16605313 Zelensky's court bans another Ukrainian opposition party

>>16605320, >>16605395 US DOS: Iran nuclear program progress 'concerning' [MACRON]?

>>16605330 BRITNEY SPEARS: Past Bread Conversation, Conservatorship in Secret Question

>>16605355 Ukrainian shelling kills ten-year-old girl

>>16605356 There's a NEW CONVOY IN DC

>>16605364 Get a load of this Real Raw article on Cringe-Crimo

>>16605323, >>16605374, >>16605380, >>16605376, >>16605385, >>16605541 Why would [They] only hire masons? [Deep State] recruiting centers? Should we ask The Queen?

>>16605388 Honored to have @realDonaldTrump’s COMPLETE AND TOTAL ENDORSEMENT! - Blake Masters

>>16605430 ADDITIONAL NOTES FROM #21010

>>16605493, >>16605512 Why were Postal workers EXEMPT from vaccine mandates yet the entire military was FORCED to get vaccinated by the Biden regime? [BIOWEAPON]

>>16605509 Analysis shows possible Chinese Communist Party meddling in Canada’s 2021 federal election

>>16605517, >>16605748, >>16605777, >>16605913, >>16605824 US MIL Tweets + Lockheed "GO for launch"

>>16605537 Richie Albertini, hollywood trafficking and ritual sacrifice whistle blower (from the Nancy Pelosi thread) on hollywood hit man Paul Barresi

>>16605260, >>16605519, >>16605554 Unfortunately, the clock is ticking

>>16605234, >>16605494, >>16605572, >>16605555, >>16605947, >>16605961 ConCERNfag bun

>>16605580 Panel beings probing child abuse withing Spain's Catholic Church

>>16605739, >>16605992 Did you know the G7 held their meeting at Hitler's old castle?

>>16605710 Last surviving member of US Army's Easy Company immortalized in Steven Spielberg's WWII series has died

>>16605740, >>16605745 The #FBI Child ID app provides a convenient place to electronically store photos and other vital information about your children

>>16605764 How California Has Become Home for a Plethora of Cults By The New York Times - 1978

>>16605871 Russia Demands Israel Cease Its 'Air Aggression' Against Syria

>>16605919 Germany is on the verge of collapse. Electricity rationing, heating regulation, skyrocketing unemployment, wave of insolvencies

>>16606013 Know your Enemy. Know your Frens. We have powerful Frens

>>16606417 #21011

Anonymous ID: 41aeef July 6, 2022, 4:02 a.m. No.141721   πŸ—„οΈ.is πŸ”—kun

#21010

>>16604487 NATO decision to declare Russia enemy destabilizes Europe

>>16604488 Picture of Highland Park Shooter in Drag Attempting to Evade Police

>>16604500 UK Government On Verge Of Collapse After Top Ministerial Resignations

>>16604528 Ukranian governor urges evacuation of 350K residents

>>16604537, >>16604749 Musk on Sock / SSH / SSL Internet Protocol

>>16604754, >>16604561, >>16604904, >>16604960 Strategic Oil Reserves sent to Europe while gas prices high in US

>>16604798 House GOP signals China a major issue against Dems in fall election

>>16604820 Paul Haggis to be released from house arrest following rape allegations

>>16604821 Trump's July Fourth message: 'I know it’s not looking good' but 'best is yet to come'

>>16604900 Beer CEOs have had it with Trump-era aluminum tariffs

>>16604916 Chelsea Handler Wanted To β€˜Call’ Melania Trump A β€˜Prostitute’ During Her Kimmel Hosting Gig, But Wasn’t Allowed

>>16605058 Gunman graphic - 47

>>16605064, >>16605052 Arrest Made After 1,000-Hog Death Wave Rocks Small Iowa County

>>16605071 90 leftist prosecutors declare refusal to enforce state abortion bans

>>16605102, >>16605160 Clockfag: Parade Attack Clock, and marker :51 drop (today on clock) "Guns are safe."

>>16605106 US Penitentiary Atlanta nearly empty amid corruption probe

>>16605115 DJT Las vegas July 8

>>16605173 #21010

 

Previously Collected

>>16604443 #21009

>>16602039 #21006, >>16602832 #21007, >>16603660 #21008

>>16599764 #21003, >>16600518 #21004, >>16601314 #21005

>>16597452 #21000, >>16598234 #21001, >>16598948 #21002

 

>>16463405 Notables #14: Gonna Rise Up

 

General Notable Pins: https://ghostbin.com/14ehq

TripCode feed: https://8kun.top/qresearch/tripcode.xml

Aggregators: https://qnotables.com | https://anontimes.com | https://qresear.ch | https://qproofs.com

Anonymous ID: 41aeef July 6, 2022, 4:05 a.m. No.141723   πŸ—„οΈ.is πŸ”—kun   >>1724

>>141722

 

/*

8Kun Baker Tools v0.7.5a

We have entered the STORM. Be STRONG!

GOD WINS! Pray MEME LOVE!

 

For God and Country! WWG1WGA

 

Features:

Post Highlighting

  • Highlight posts that are marked notable (I.E. someone has replied and said

notable) in light green

  • Highlight nominating posts in dark green

  • Highlight nominating posts in posts mentions in light green

  • Highlight Q Posts in yellow

  • Highlight Q posts in mentions (I.E. on posts that get (YOU)'ed)

  • Highlight links to Q Posts in sparkle (Like q's trip)

  • Highlight BV Posts

  • Highlight previous bread links in blue

 

Navigation

  • Cycle through Q Posts

  • Cycle through BO and BV Posts

  • Cycle through (You)'s

  • Cycle through own posts

  • Jump To Bottom Link

  • Jump To Bottom Top link

  • NEW IN v0.7.0 Jump to last reading location (like when you post and it

sends you to bottom, you can jump right back)

  • Easy access to Breads via Bread List window

  • Scrollbar navigation shows location of Q/You/Notable/etc posts

  • NEW IN v0.7.0: Hover over post marker to preview post

  • Click on a post marker in scrollbar to jump to post

Anonymous ID: 41aeef July 6, 2022, 4:05 a.m. No.141724   πŸ—„οΈ.is πŸ”—kun   >>1725 >>1726

>>141723

Filtering

  • Filter to only nominating and notable posts, Q posts, Q replies

  • Option to blur images until hover

  • Image blacklist (AKA the NOPE button)

  • NEW IN v0.7.0: SpamFader with multiple spam detection strategies:

  • NameFag strategy: Marks namefags as spam

  • Breadshitter strategy: Marks bread shitters as spam

  • High post count strategy: Marks those with high post count as spam

  • Flood fag strategy: Marks those who post in short intervals as spam

  • Mark user as not spam button

  • Spam badges tell WHY the algorithm marked as post as spam. TRANSPARENCY!

 

Customizable

  • NEW IN v0.7.0: Customizable post highlighting colors

  • Hide/Show features

  • Settings saved in localStorage

 

Notables

  • Generate notables post

  • Adds "Notable Nomination" button to posts that opens the

Quick Reply box and prefills it with a BAKER NOTABLE Template

 

Stats

  • Thread stats overlay with

* color coded reply count that goes from green to red as bread ages

* UID Count

  • Post rate chart shows how many posts per min

  • NEW IN v0.7.4: Oven timer displays time until new bake (default 700)

 

To Install:

  1. Copy this source code

  2. Go to 8kun

  3. Click "Options" in the top right

  4. Choose "User JS" tab

  5. Paste Baker tools JS

  6. WWG1WGA

Anonymous ID: 41aeef July 6, 2022, 4:06 a.m. No.141725   πŸ—„οΈ.is πŸ”—kun

>>141724

Changelog:

0.7.5a

  • BO and BV post marking and nav controls, with custom colo(u)rs

0.7.5

  • BV post marking and nav controls, with custom colo(u)rs

0.7.4

  • Fix UIDs in stats overlay

  • NEW Bakers now have an oven timer

  • Calculate and display estimated remaining time before baking

  • Based on bakeAtPosts param. default 700

  • Uses posts per minute calculation, posts, and bakeAtPosts, to calculate oven timer

0.7.3

  • Fix previous bread vs next bread link highlighting logic

  • Update navigation controls colo(u)r to play nicer with dark theme

 

0.7.2

  • Use flex layout in bakerwindow controls

  • Reorder navcontrols

  • Reduce space of controls in boardlist

  • Disable spamfader new post event listener on disable

  • Don't mark q posts as notable

  • Make windows resizable width, fix table formatting in breadlist

  • Use boardlist height in current index calcs

 

0.7.1

  • Fix notable navigation in boardlist checkbox not working

  • Differentiate between previous and newer breads when highlighting

 

0.7.0

  • Switched color scheme to match other tools

  • Post Per Minute Graph

  • Spam Fading with multiple strategies and spam badges to tell why post is spam

  • Allow customization of post highligting colors

  • Add go back to last reading location button

  • Improve Q post detection (all past trip codes)

  • Add post preview on hover to Scrollbar Navigation

  • Navigation controls are now aware of current page location

  • Bugfixes

Anonymous ID: 41aeef July 6, 2022, 4:06 a.m. No.141726   πŸ—„οΈ.is πŸ”—kun   >>1727

>>141724

0.6.0'

  • Navigation bar shows scroll location of q/you/notable

posts and allows jumping to posts

  • Notable navigation controls in baker window and board list

  • Persistent Image Blacklist (AKA Nope Button)

  • Many bugfixes

 

0.5.2

  • Fixes bread list table population bug

 

0.5.0

  • Option to show Q/(YOU)/Own Post navigation controls in the boardlist

  • Option to hide Notable nomination button

  • List of research breads

  • BakerTools settings are now saved in local storage

 

0.4.0

  • Option to blur images until hover

  • Adds a "Notable Nomination" button to posts that opens the Quick Reply

box and prefills it with a BAKER NOTABLE Template

  • Add Q Post navigation links to the Baker Window

  • Add (You) navigation links to the Baker Window

  • Add own post navigation links to the Baker Window

  • Cleaned up baker window design

 

  • More code cleanup and linting changes

 

0.3.0

  • Highlights Q Posts with white BG -DARK TO LIGHT!

  • Highlights Q posts in mentions (I.E. posts that get (YOU)'ed)

  • Highlights links to Q Posts

 

  • Refactored code into classes for easier maint.

Anonymous ID: 41aeef July 6, 2022, 4:06 a.m. No.141727   πŸ—„οΈ.is πŸ”—kun   >>1728 >>1729

>>141726

0.2.0

  • Highlight pb links

  • Thread stats overlay with

* color coded reply count that goes from green to red as bread ages

* UID Count

* Jump To Bottom Link

* Jump To Bottom Top link

 

0.1.0

Initial release:

  • Highlight notables and nominators

  • Filter to only show notables and nominators

  • Create notables post

 

Version History:

https://controlc.com/a0409084 0.7.5

https://controlc.com/aab605ea 0.7.4

https://pastebin.com/EDmx2iEr 0.7.3

https://pastebin.com/L1p6iRzZ 0.7.2

https://pastebin.com/dN5FhHCv 0.7.1

https://pastebin.com/6XuDuHYu 0.7.0

https://pastebin.com/YTSSmH7t 0.6.0

https://pastebin.com/mPVxr7Lz 0.5.2

https://pastebin.com/nEhm7yyY 0.5.1

https://pastebin.com/i9sF0Rd3 0.4.0

https://pastebin.com/kz9LrcE9 0.3.0

https://pastebin.com/4aEFsPwK 0.2.0

https://pastebin.com/eNmTtzdi 0.1.0

*/

(function($) {

"use strict";

 

/ globals $, board_name /

/ exported 8kun /

 

/**

* Functions and vars related to EightKun functionality

*/

class EightKun {

/**

* Get reply links in post

* @param

Anonymous ID: 41aeef July 6, 2022, 4:06 a.m. No.141728   πŸ—„οΈ.is πŸ”—kun   >>1730

>>141727

ttps://pastebin.com/i9sF0Rd3 0.4.0

https://pastebin.com/kz9LrcE9 0.3.0

https://pastebin.com/4aEFsPwK 0.2.0

https://pastebin.com/eNmTtzdi 0.1.0

*/

(function($) {

"use strict";

 

/ globals $, board_name /

/ exported 8kun /

 

/**

* Functions and vars related to EightKun functionality

*/

class EightKun {

/**

* Get reply links in post

* @paramuery}

*/

static getReplyLinksFromPost(post) {

return $(post).find(EightKun.REPLY_SELECTOR)

.filter(function(idx, link) {

return $(link).text().match(EightKun.REPLY_SHORTLINK_REGEX);

});

}

 

/**

* Get the post number that is being replied to

* @param {Anchor} link

* @return {string}

*/

static getPostNumberFromReplyLink(link) {

return $(link).text()

.match(EightKun.REPLY_SHORTLINK_REGEX)[1];

}

 

/**

Anonymous ID: 41aeef July 6, 2022, 4:06 a.m. No.141729   πŸ—„οΈ.is πŸ”—kun   >>1731

>>141727

 

/**

* Get time of post

* @param {Element} post div.post

* @return {number} post time in unixtime

*/

static getPostTime(post) {

return $(post).find('.intro time').attr('unixtime');

}

 

/**

* Get date of post

* @param {Element} post div.post

* @return {number} post time in unixtime

*/

static getPostDateTime(post) {

return $(post).find('.intro time').attr('datetime');

}

 

/**

* Get poster id of provided post

* @param {Element} post div.post

* @return {string} id of poster

*/

static getPosterId(post) {

return $(post).find('p span.poster_id').first().text();

}

 

/**

* Get name from post

* @param {Element} post div.post

* @return {string} name of post

*/

static getPostName(post) {

return $(post).find('.intro label > .name').text();

}

 

/**

* Get capcode from post

* @param {Element} post div.post

* @return {string} capcode of post

*/

static getPostCapcode(post) {

return $(post).find('.intro label > .capcode').text();

}

 

/**

* Get trip from post

* @param {Element} post div.post

* @return {string} trip of post

*/

static getPostTrip(post) {

return $(post).find('.intro .trip').text();

}

Anonymous ID: 41aeef July 6, 2022, 4:06 a.m. No.141730   πŸ—„οΈ.is πŸ”—kun

>>141728

 

/**

* Get the opening post of the thread

* @return {Element} div.post

*/

static getOpPost() {

return $(EightKun.OP_POST_SELECTOR);

}

 

/**

* Get poster id of OP

* @return {number} poster id

*/

static getOpPosterId() {

return EightKun.getPosterId(EightKun.getOpPost());

}

 

/**

* Is the post made by op?

* @param {Element} post div.post

* @return {boolean} true if op's post

*/

static isPostFromOp(post) {

return EightKun.getPosterId(post) === EightKun.getOpPosterId();

}

 

/**

* Get the thread id

* @return {number} id of thread

*/

static getThreadId() {

return $('.thread').get(0).id.split('_')[1];

}

 

/**

* Use 8kun hide function on post

* @param {Element} post div.post

*/

static hidePost(post) {

// TODO: implement it and use in spam and blacklist

}

 

/**

* Get current board

* @retu

Anonymous ID: 41aeef July 6, 2022, 4:07 a.m. No.141731   πŸ—„οΈ.is πŸ”—kun   >>1732

/**

* Get the opening post of the thread

* @return {Element} div.post

*/

static getOpPost() {

return $(EightKun.OP_POST_SELECTOR);

}

 

/**

* Get poster id of OP

* @return {number} poster id

*/

static getOpPosterId() {

return EightKun.getPosterId(EightKun.getOpPost());

}

 

/**

* Is the post made by op?

* @param {Element} post div.post

* @return {boolean} true if op's post

*/

static isPostFromOp(post) {

return EightKun.getPosterId(post) === EightKun.getOpPosterId();

}

 

/**

* Get the thread id

* @return {number} id of thread

*/

static getThreadId() {

return $('.thread').get(0).id.split('_')[1];

}

 

/**

* Use 8kun hide function on post

* @param {Element} post div.post

*/

static hidePost(post) {

// TODO: implement it and use in spam and blacklist

}

 

/**

* Get current board

* @retu >>141729

Anonymous ID: 41aeef July 6, 2022, 4:07 a.m. No.141732   πŸ—„οΈ.is πŸ”—kun   >>1733

>>141731

static getCurrentBoard() {

/ eslint-disable camelcase /

return board_name;

}

 

/**

* Get post number of post

* @param {Element} post div.post

* @return {number} Number of the post

*/

static getPostNumber(post) {

return post.id.split('_')[1];

}

 

/**

* Get the top boardlist element

* @return {Element} div.boardlist

*/

static getTopBoardlist() {

return $(EightKun.TOP_BOARDLIST_SELECTOR).get(0);

}

}

EightKun.POST_SELECTOR = 'div.post';

EightKun.POST_REPLY_SELECTOR = 'div.post.reply';

EightKun.OP_POST_SELECTOR = 'div.post.op';

EightKun.POST_BODY_SELECTOR = '.body';

EightKun.POST_MODIFIED_SELECTOR = '.post_modified';

EightKun.NEW_POST_EVENT = 'new_post';

EightKun.OP_SUBJECT_SELECTOR = '.post.op p > label > span.subject';

EightKun.REPLY_SELECTOR = 'div.body:first a:not([rel="nofollow"])';

EightKun.REPLY_SHORTLINK_REGEX = /^>>(\d+)$/;

EightKun.REPLY_REGEX = /highlightReply('(.+?)'/;

EightKun.BOARDLIST_SELECTOR = .boardlist;

EightKun.TOP_BOARDLIST_SELECTOR = ${EightKun.BOARDLIST_SELECTOR}:first;

 

/**

* Wrapper for 8kun active_page variable to determine the type of

* page the user is on.

*/

class ActivePage {

/**

* Are we currently on the thread index page?

* @return {boolean} True if on index

*/

static isIndex() {

return window.active_page == ActivePage.Index;

}

 

/**

* Are we currentl

Anonymous ID: 41aeef July 6, 2022, 4:07 a.m. No.141733   πŸ—„οΈ.is πŸ”—kun   >>1734

>>141732

/**

* Are we currently on the thread catalog page?

* @return {boolean} True if on catalog

*/

static isCatalog() {

return window.active_page == ActivePage.Catalog;

}

 

/**

* Are we on a thread page?

* @return {boolean} True if on thread

*/

static isThread() {

return window.active_page == ActivePage.Thread;

}

}

ActivePage.Index = 'index';

ActivePage.Catalog = 'catalog';

ActivePage.Thread = 'thread';

 

/ globals $ /

/ exported ColorPicker /

 

/**

* A color picker control that saves to localStorage

*/

class ColorPicker {

/**

* Construct color picker

*

* @param {string} label The label for the control

* @param {string} title Mouseover title

* @param {string} setting localStorage setting name

* @param {string} defaultValue the default color when setting is missing

* @param {Function} changeHandler handler for value changes. Passes color

*/

constructor(label, title, setting, defaultValue, changeHandler) {

this.styleId = 'bakertools-colorpickers-styles';

this.class = 'bakertools-colorpicker';

this.labelClass = 'bakertools-colorpicker-label';

this.inputClass = 'bakertools-colorpicker-input';

this.resetButtonClass = 'bakertools-colorpicker-reset';

this.changeHandler = changeHandler;

 

this.label = label;

this.title = title;

this.setting = setting;

this.defaultValue = defaultValue;

this.strippedNa

Anonymous ID: 41aeef July 6, 2022, 4:07 a.m. No.141734   πŸ—„οΈ.is πŸ”—kun   >>1735

>>141733

this.defaultValue = defaultValue;

 

this._createStyles();

this._createElement();

}

 

/**

* Create the HTML Element

*/

_createElement() {

this.element = $(`

<div class='${this.class}'>

<label class='${this.labelClass}'

for="${this.strippedName}" title="${this.title}" >

${this.label}:

</label>

</div>

`).get(0);

 

this.input = $(`

<input type="color" class='${this.inputClass}'

id="${this.strippedName}" title="${this.title}" />

`).get(0);

$(this.element).append(this.input);

 

$(this.input).change(function(e) {

this.setColor(this.input.value);

}.bind(this));

 

this.reset = $(`

<button class='${this.resetButtonClass}' title="Reset to Default">

<i class="fa fa-undo"></i>

</button>

`).get(0);

$(this.element).append(this.reset);

 

$(this.reset).click(function(e) {

e.preventDefault();

this.setColor(this.defaultValue);

}.bind(this));

 

this.setColor(localStorage.getItem(this.setting) || this.defaultValue);

}

 

/**

* Set the color

* @param {string} color valid css color string

*/

setColor(color) {

localStorage.setItem(this.setting, color);

this.input.value = color;

this.changeHandler(color);

}

Anonymous ID: 41aeef July 6, 2022, 4:08 a.m. No.141735   πŸ—„οΈ.is πŸ”—kun   >>1736

>>141734

 

/**

* Get the color

* @return {string} color

*/

getColor() {

return this.input.value;

}

/**

* Create styles for the control

*/

_createStyles() {

if ($(#${this.styleId}).length) {

return;

}

$('head').append(`

<style id='${this.styleId}'>

.${this.class} {

display: flex;

align-items: center;

}

 

.${this.class} .${this.labelClass} {

flex-grow: 1;

}

 

.${this.class} .${this.inputClass} {

margin-right: .5em;

}

 

.${this.resetButtonClass} {

padding: 0;

background-color: Transparent;

background-repeat: no-repeat;

border: none;

cursor: pointer;

overflow: hidden;

outline: none;

}

</style>

`);

}

}

 

/ global $, debounce, EightKun /

/**

* Creates first, prev, next, last navigation controls

*/

class

Anonymous ID: 41aeef July 6, 2022, 4:08 a.m. No.141736   πŸ—„οΈ.is πŸ”—kun   >>1737

>>141735

/**

* Creates first, prev, next, last navigation controls

*/

class NavigationControl {

/**

* Construct navigatio control manager object

*

* @param {string} label the label for the control

* @param {Function} updateFunction Called to get latest data

* @param {string} updateEventName Called to get latest data

*/

constructor(label, updateFunction, updateEventName) {

const strippedName = label.replace(/(\s|(|)|'|"|:)/g, '');

this.styleId = 'bakertools-navigationcontrol-styles';

this.label = label;

this.updateFunction = updateFunction;

this.updateEventName = updateEventName;

this.list = this.updateFunction();

 

this.currentIndex = -1;

const instanceId = $(NavigationControl.containerClass).length;

this.navigationClass = bakertools-navcontrol-${strippedName};

this.indexChangeEvent =

bakertools-navcontrol-${strippedName}-index-changed;

 

this.currentIndexId = ${this.navigationClass}-current-index-${instanceId};

this.currentIndexClass = bakertools-navcontrol-current-index;

this.totalClass = ${this.navigationClass}-total;

this.goToFirstClass = ${this.navigationClass}-goto-first;

this.goToPreviousClass = ${this.navigationClass}-goto-prev;

this.goToNextClass = ${this.navigationClass}-goto-next;

this.goToLastClass = ${this.navigationClass}-goto-last;

 

this._setupStyles();

this._createElement();

this.updateIndexFromCurrentScrollPosition();

this.updateIndexFromCurrentScrollPosition =

debounce(this.updateIndexFromCurrentScrollPosition, 500);

this._setupListeners();

}

 

// TODO: switch to flexbox layout

/**

* setup styles for nav control

*/

_setupStyles() {

if ($(#${this.styleId}).length) {

return;

}

const boardListNavSelector =

${EightKun.BOARDLIST_SELECTOR} .${NavigationControl.containerClass};

$('head').append(`

<style id='${this.styleId}'>

${boardListNavSelector}:before {

content: '[';

color: #89A;

}

Anonymous ID: 41aeef July 6, 2022, 4:08 a.m. No.141737   πŸ—„οΈ.is πŸ”—kun   >>1738

>>141736

 

${boardListNavSelector}:after {

content: ']';

color: #89A;

}

 

${boardListNavSelector} {

color: rgb(20, 137, 183);

}

</style>

`);

}

 

/**

* Create nav element

*/

_createElement() {

this.element = $(`

<span title="Navigate ${this.label}"

class="${NavigationControl.containerClass}">

 

<label for="${this.navigationClass}">${this.label}:</label>

<span class="${this.navigationClass}

${NavigationControl.navigationControlClass}">

<i class="fa fa-angle-double-left ${this.goToFirstClass}"></i>

<i class="fa fa-angle-left ${this.goToPreviousClass}"></i>

 

<span class="${this.currentIndexClass}" id='${this.currentIndexId}'>

${this.currentIndex+1}

</span

:

<span class="${this.totalClass}">${this.list.length}</span>

 

<i class="fa fa-angle-right ${this.goToNextClass}"></i>

<i class="fa fa-angle-double-right ${this.goToLastClass}"></i>

</span>

</span>

`).get(0);

}

 

/**

* Setup button event listeners

*/

_setupListeners() {

$(this.element).find('.'+this.goToFirstClass).click(function(e) {

this.goToFirstPost();

}.bind(this));

 

$(this.element).find('.'+this.goToPreviousClass).click(function(e) {

this.goToPreviousPost();

}.bind(this));

Anonymous ID: 41aeef July 6, 2022, 4:08 a.m. No.141738   πŸ—„οΈ.is πŸ”—kun   >>1739

>>141737

$(this.element).find('.'+this.goToNextClass).click(function(e) {

this.goToNextPost();

}.bind(this));

 

$(this.element).find('.'+this.goToLastClass).click(function(e) {

this.goToLastPost();

}.bind(this));

 

$(document).on(this.indexChangeEvent, function(e, index) {

if (this.currentIndex == index) return;

this._setCurrentIndex(index);

}.bind(this));

 

$(document).on(this.updateEventName, function() {

this.list = this.updateFunction();

$(this.element).find(.${this.totalClass}).text(this.list.length);

}.bind(this));

 

$(document).scroll(this.updateIndexFromCurrentScrollPosition.bind(this));

}

 

/**

* Determine the current index based on scroll position

*/

updateIndexFromCurrentScrollPosition() {

const boardListHeight = $(EightKun.getTopBoardlist()).height();

for (let i = 0; i < this.list.length; ++i) {

const post = this.list[i];

const boundingRect = post.getBoundingClientRect();

 

const postTopAboveBottomOfScreen = boundingRect.top < window.innerHeight;

const postBottomBelowTopOfScreen = boundingRect.bottom boardListHeight;

const currentPostIsInViewport = postTopAboveBottomOfScreen &&

postBottomBelowTopOfScreen;

 

if (currentPostIsInViewport) {

this._setCurrentIndex(i);

break;

}

 

const isFirstPost = i === 0;

const isBeforeFirstNotable = isFirstPost && !postTopAboveBottomOfScreen;

if (isBeforeFirstNotable) {

this._setCurrentIndex(-1);

break;

}

 

const isLastPost = i === (this.list.length - 1);

const isPastLastNotable = isLastPost && !postBottomBelowTopOfScreen;

if (isPastLastNotable) {

this._set

Anonymous ID: 41aeef July 6, 2022, 4:08 a.m. No.141739   πŸ—„οΈ.is πŸ”—kun   >>1740

>>141738

break;

}

 

const nextPost = this.list[i+1];

const nextPostBounds = nextPost.getBoundingClientRect();

const nextPostIsBelowBottomOfScreen =

nextPostBounds.top >= window.innerHeight;

const inBetweenPosts = !postBottomBelowTopOfScreen &&

nextPostIsBelowBottomOfScreen;

if (inBetweenPosts) {

this._setCurrentIndex(i + .5);

break;

}

}

}

 

/**

* Scroll to first post

*/

goToFirstPost() {

if (!this.list.length) {

return;

}

this._setCurrentIndex(0);

this.scrollToCurrentPost();

}

 

/**

* Scroll to next navigated post

*/

goToPreviousPost() {

if (!this.list.length) {

return;

}

if (this.currentIndex <= 0) {

this._setCurrentIndex(this.list.length - 1);

} else {

this._setCurrentIndex(Math.ceil(this.currentIndex) - 1);

}

this.scrollToCurrentPost();

}

/**

* Scroll to next navigated post

*/

goToNextPost() {

if (!this.list.length) {

return;

}

const lastPostIndex = this.list.length - 1;

if (this.currentInd

Anonymous ID: 41aeef July 6, 2022, 4:08 a.m. No.141740   πŸ—„οΈ.is πŸ”—kun   >>1741

>>141739

this._setCurrentIndex(0);

} else {

this._setCurrentIndex(Math.floor(this.currentIndex) + 1);

}

this.scrollToCurrentPost();

}

 

/**

* Scroll the last post in this bread into view

*/

goToLastPost() {

if (!this.list.length) {

return;

}

const numPosts = this.list.length;

this._setCurrentIndex(numPosts - 1);

this.scrollToCurrentPost();

}

 

/**

* Scrolls the current selected post into view

*/

scrollToCurrentPost() {

const post = this.list[this.currentIndex];

$(post).get(0).scrollIntoView();

 

// Trigger events for other views of this data

$(document).trigger(this.indexChangeEvent,

this.currentIndex);

 

const boardListHeight = $(EightKun.getTopBoardlist()).height();

window.scrollBy(0, -boardListHeight);

}

 

/**

* Set internal index var and UI

* @param {number} index

*/

_setCurrentIndex(index) {

this.currentIndex = index;

this._setCurrentIndexControlValue(index + 1);

}

 

/**

* Sets the value of the current index in the UI

* @param {number} val

*/

_setCurrentIndexControlValue(val) {

$('#'+this.currentIndexId).text(val);

}

}

NavigationControl.containerClass = bakertools-navcontrol-container;

NavigationControl.navigationControlClass = 'bakertools-navigation-control';

 

/ global EightKun, $, NotableHighlighter /

/**

Anonymous ID: 41aeef July 6, 2022, 4:09 a.m. No.141741   πŸ—„οΈ.is πŸ”—kun   >>1742

>>141740

 

/ global EightKun, $, NotableHighlighter /

/**

* Wrapper for a post nominated as notable

*/

class NotablePost {

/**

* Construct an empty notable post object

*/

constructor() {

this.element = null;

this.postNumber = null;

this.description = '[DESCRIPTION]';

this.nominatingPosts = [];

}

 

/**

* Create a notable post from a nominating post

*

* @param {Element} nominatingPost A post that is nominating a notable

* @return {NotablePost} a Notable post or NullNotablePost if it fails

*/

static fromNominatingPost(nominatingPost) {

const notables = [];

EightKun.getReplyLinksFromPost(nominatingPost)

.each(function(idx, link) {

const postNumber = EightKun.getPostNumberFromReplyLink(link);

const notablePostElement = $(#reply_${postNumber}).get(0);

if (window.bakerTools.qPostHighlighter.isQ(notablePostElement)) {

return false;

}

if (window.bakerTools.qPostHighlighter.isBV(notablePostElement)) {

return false;

}

if (!NotablePost.findNotableByPostNumber(postNumber)) {

const notable = new NotablePost();

 

if (notablePostElement) {

notable.setElement(notablePostElement);

} else {

// TODO: set pb description

// get the json from the post number

notable.postNumber = postNumber;

}

notable.addNominatingPost(nominatingPost);

 

NotablePost.addToListOfNotables(notable);

notables.push(notable);

 

if (notable.element) { // Not pb will need to figure something out

$(document).trigger(NotablePost.NEW_NOTABLE_POST_EVENT,

notable.element);

}

}

});

return notables;

}

Anonymous ID: 41aeef July 6, 2022, 4:09 a.m. No.141742   πŸ—„οΈ.is πŸ”—kun   >>1743

>>141741

 

/**

* Add notable to list, and sort list

* @param {NotablePost} notable

*/

static addToListOfNotables(notable) {

NotablePost._notables.push(notable);

NotablePost._notables.sort(function(n1, n2) {

if (n1.postNumber < n2.postNumber) {

return -1;

} else if ( n1.postNumber n2.postNumber) {

return 1;

}

return 0;

});

}

 

/**

* Is this a NullNotablePost

* @return {boolean} false

*/

isNull() {

return false;

}

 

/**

* @return {Array<NotablePost>} Array of the current notables

*/

static getNotables() {

return NotablePost._notables;

}

 

/**

* Get notable posts as regular 8kun div.post

* @return {Array} of div.post

*/

static getNotablesAsPosts() {

return NotablePost._notables

.filter((n) =n.element !== null)

.map((n) =n.element);

}

 

/**

* @arg {number} postNumber The post number of notable

* @return {NotablePost}

*/

static findNotableByPostNumber(postNumber) {

return NotablePost._notables.find((notable) =notable.postNumber ==

postNumber);

}

 

/**

* Set the element of the post

* @arg {Element} element

*/

setElement(element) {

this.element = element;

this._markAsNotable(this.element);

this.description = element.querySelector('.body')

.innerText

.replace(/\n/g, ' ');

this.postNumber = $(this.element).find('.intro .post_no')

.text()

.replace('No.', '');

}

Anonymous ID: 41aeef July 6, 2022, 4:09 a.m. No.141743   πŸ—„οΈ.is πŸ”—kun   >>1744

>>141742

/**

* Get the reply shortlink for the post

* @return {string}

*/

shortLink() {

return '>>' + this.postNumber;

}

 

/**

* Add a nominator to the notable

*

* @param {Element} nominatingPost A .div.post that nominates this post

*/

addNominatingPost(nominatingPost) {

this.nominatingPosts.push(nominatingPost);

this._markAsNominator(nominatingPost);

this._markNominatorInMentions(nominatingPost);

}

 

/**

* @arg {Element} nominatorPost .post

*/

_markAsNominator(nominatorPost) {

nominatorPost.classList.add(NotableHighlighter.NOMINATOR_CLASS);

}

 

/**

* @arg {Element} post .post

*/

_markAsNotable(post) {

post.classList.add(NotableHighlighter.NOTABLE_CLASS);

}

 

/**

* Gives links to nominators a special style in notable mentions

*

* @param {Element} nominatingPost A .div.post that is nominating this

* notable

*/

_markNominatorInMentions(nominatingPost) {

if (!this.element) {

console.info(Notable post is null - possible pb/lb);

return;

}

const nominatingPostId = nominatingPost.id.replace('reply_', '');

$(this.element).find('.mentioned-'+nominatingPostId)

.addClass(NotableHighlighter.NOMINATOR_CLASS);

}

}

Notab

Anonymous ID: 41aeef July 6, 2022, 4:09 a.m. No.141744   πŸ—„οΈ.is πŸ”—kun   >>1745

>>141743

}

NotablePost._notables = [];

NotablePost.NULL = null; // NullNotablePost

NotablePost.NEW_NOTABLE_POST_EVENT = 'bakertools-new-notable-post-event';

 

/ globals EightKun /

/**

* Research Bread Class

*/

class ResearchBread {

/**

* Get an array of post bodies with dough posts filtered out

* @return {NodeList} of .post elements

*/

static getPostsWithoutDough() {

const posts = Array.from(document

.querySelectorAll(EightKun.POST_SELECTOR));

 

const filteredPosts = posts.filter(function(post) {

return !post.querySelector(EightKun.POST_BODY_SELECTOR)

.innerText.match(ResearchBread.DOUGH_POSTS_REGEX);

});

 

return filteredPosts;

}

 

/**

* Determine what the bread number is

* @return {number} the number of the research bread

*/

static getBreadNumber() {

const breadNumberRegex = /#(.+?) /;

return document.querySelector(EightKun.OP_SUBJECT_SELECTOR)

.innerText

.match(breadNumberRegex)[1] || 'COULD NOT FIND BREAD NUMBER';

}

 

/**

* Find the post with the dough

* @return {Element} div.post

*/

static getDoughPost() {

const posts = Array.from(document

.querySelectorAll(EightKun.POST_SELECTOR));

 

const dough = posts.find(function(post) {

return post.querySelector(EightKun.POST_BODY_SELECTOR)

.innerText.toUpperCase().match(ResearchBread.DOUGH_POST_TITLE);

});

return dough;

}

}

Anonymous ID: 41aeef July 6, 2022, 4:10 a.m. No.141745   πŸ—„οΈ.is πŸ”—kun   >>1746

>>141744

/**

* Perform post hover functionality for provided post

* @param {Element} post div.post

* @param {number} hoverY y location to hover at

*/

postHover(post, hoverY) {

this.hovering = true;

this.hoveringPost = post;

const $post = $(post);

if ($post.is(':visible') &&

$post.offset().top >= $(window).scrollTop() &&

$post.offset().top + $post.height() <=

$(window).scrollTop() + $(window).height()) {

// post is in view

$post.addClass('highlighted');

} else {

const newPost = $post.clone();

newPost.find('>.reply, >br').remove();

newPost.find('a.post_anchor').remove();

 

const postNumber = EightKun.getPostNumber(post);

newPost.attr('id', 'post-hover-' + postNumber)

.attr('data-board', EightKun.getCurrentBoard())

.addClass('post-hover')

.css('border-style', 'solid')

.css('box-shadow', '1px 1px 1px #999')

.css('display', 'block')

.css('position', 'absolute')

.css('font-style', 'normal')

.css('z-index', '100')

.css('left', '0')

.css('margin-left', '')

.addClass('reply')

Anonymous ID: 41aeef July 6, 2022, 4:10 a.m. No.141746   πŸ—„οΈ.is πŸ”—kun   >>1747

>>141745

.addClass('post')

.appendTo('.thread');

 

// shrink expanded images

newPost.find('div.file img.post-image').css({

'display': '',

'opacity': '',

});

newPost.find('div.file img.full-image').remove();

 

let previewWidth = newPost.outerWidth(true);

const widthDiff = previewWidth - newPost.width();

const scrollNavLeft = $(this.element).offset().left;

let left;

 

if (scrollNavLeft < $(document).width() * 0.7) {

left = scrollNavLeft + $(this.element).width();

if (left + previewWidth $(window).width()) {

newPost.css('width', $(window).width() - left - widthDiff);

}

} else {

if (previewWidth scrollNavLeft) {

newPost.css('width', scrollNavLeft - widthDiff);

previewWidth = scrollNavLeft;

}

left = scrollNavLeft - previewWidth;

}

newPost.css('left', left);

 

const scrollTop = $(window).scrollTop();

let top = scrollTop + hoverY;

 

if (top < scrollTop + 15) {

top = scrollTop;

} else if (top scrollTop + $(window).height() - newPost.height() - 15) {

top = scrollTop + $(window).height() - newPost.height() - 15;

}

 

if (newPost.height() $(window).height()) {

top = scrollTop;

Anonymous ID: 41aeef July 6, 2022, 4:10 a.m. No.141747   πŸ—„οΈ.is πŸ”—kun   >>1748

>>141746

$post.addClass('highlighted');

} else {

const newPost = $post.clone();

newPost.find('>.reply, >br').remove();

newPost.find('a.post_anchor').remove();

 

const postNumber = EightKun.getPostNumber(post);

newPost.attr('id', 'post-hover-' + postNumber)

.attr('data-board', EightKun.getCurrentBoard())

.addClass('post-hover')

.css('border-style', 'solid')

.css('box-shadow', '1px 1px 1px #999')

.css('display', 'block')

.css('position', 'absolute')

.css('font-style', 'normal')

.css('z-index', '100')

.css('left', '0')

.css('margin-left', '')

.addClass('reply')

.addClass('post')

.appendTo('.thread');

 

// shrink expanded images

newPost.find('div.file img.post-image').css({

'display': '',

'opacity': '',

});

newPost.find('div.file img.full-image').remove();

 

let previewWidth = newPost.outerWidth(true);

const widthDiff = previewWidth - newPost.width();

const scrollNavLeft = $(this.element).offset().left;

let left;

 

if (scrollNavLeft < $(document).width() * 0.7) {

left = scrollNavLeft + $(this.element).width();

if (left + previewWidth $(

Anonymous ID: 41aeef July 6, 2022, 4:10 a.m. No.141748   πŸ—„οΈ.is πŸ”—kun   >>1749

>>141747

previewWidth = scrollNavLeft;

}

left = scrollNavLeft - previewWidth;

}

newPost.css('left', left);

 

const scrollTop = $(window).scrollTop();

let top = scrollTop + hoverY;

 

if (top < scrollTop + 15) {

top = scrollTop;

} else if (top scrollTop + $(window).height() - newPost.height() - 15) {

top = scrollTop + $(window).height() - newPost.height() - 15;

}

 

if (newPost.height() $(window).height()) {

top = scrollTop;

}

newPost.css('top', top);

}

}

 

/**

* End hovering

*/

endHover() {

this.hovering = false;

if (!this.hoveringPost) {

return;

}

 

$(this.hoveringPost).removeClass('highlighted');

if ($(this.hoveringPost).hasClass('hidden')) {

$(this.hoveringPost).css('display', 'none');

}

$('.post-hover').remove();

}

 

/**

* Show/hide scrollbar

* @param {

Anonymous ID: 41aeef July 6, 2022, 4:11 a.m. No.141749   πŸ—„οΈ.is πŸ”—kun   >>1750

>>141748

const canvas = this.element;

canvas.height = window.innerHeight;

const ctx = canvas.getContext('2d');

if (!ctx) {

console.info('no ctx - is the element created yet?');

return;

}

ctx.clearRect(0, 0, canvas.width, canvas.height);

 

const cachedHeight = $(document).height();

const scrollHeight = canvas.height;

 

this.coordsToPost = new Map();

 

let lastCoords = null;

this.posts.forEach(function(post, index) {

const color = $(post).css('backgroundColor');

const postRect = post.getBoundingClientRect();

const scrollLocationPercentage =

(window.scrollY + postRect.top) / cachedHeight;

let drawLocation = scrollLocationPercentage * scrollHeight;

 

const overlappingPrevious = lastCoords &&

drawLocation <= (lastCoords.bottom + 2);

if (overlappingPrevious) {

drawLocation = lastCoords.bottom + 4;

}

const drawHeight = Math.max(

(postRect.height / cachedHeight) * scrollHeight,

5,

);

const coords = new ScrollbarCoordinates(drawLocation,

drawLocation + drawHeight);

this.coordsToPost.set(coords, post);

 

ctx.fillStyle = color;

ctx.fillRect(0, drawLocation, canvas.width, drawHeight);

lastCoords = coords;

}.bind(this));

}

Anonymous ID: 41aeef July 6, 2022, 4:11 a.m. No.141750   πŸ—„οΈ.is πŸ”—kun   >>1751

>>141749

vas = this.element;

canvas.height = window.innerHeight;

const ctx = canvas.getContext('2d');

if (!ctx) {

console.info('no ctx - is the element created yet?');

return;

}

ctx.clearRect(0, 0, canvas.width, canvas.height);

 

const cachedHeight = $(document).height();

const scrollHeight = canvas.height;

 

this.coordsToPost = new Map();

 

let lastCoords = null;

this.posts.forEach(function(post, index) {

const color = $(post).css('backgroundColor');

const postRect = post.getBoundingClientRect();

const scrollLocationPercentage =

(window.scrollY + postRect.top) / cachedHeight;

let drawLocation = scrollLocationPercentage * scrollHeight;

 

const overlappingPrevious = lastCoords &&

drawLocation <= (lastCoords.bottom + 2);

if (overlappingPrevious) {

drawLocation = lastCoords.bottom + 4;

}

const drawHeight = Math.max(

(postRect.height / cac

Anonymous ID: 41aeef July 6, 2022, 4:11 a.m. No.141751   πŸ—„οΈ.is πŸ”—kun   >>1752

>>141750

const color = $(post).css('backgroundColor');

const postRect = post.getBoundingClientRect();

const scrollLocationPercentage =

(window.scrollY + postRect.top) / cachedHeight;

let drawLocation = scrollLocationPercentage * scrollHeight;

 

const overlappingPrevious = lastCoords &&

drawLocation <= (lastCoords.bottom + 2);

if (overlappingPrevious) {

drawLocation = lastCoords.bottom + 4;

}

const drawHeight = Math.max(

(postRect.height / cachedHeight) * scrollHeight,

5,

);

const coords = new ScrollbarCoordinates(drawLocation,

drawLocation + drawHeight);

this.coordsToPost.set(coords, post);

 

ctx.fillStyle = color;

ctx.fillRect(0, drawLocation, canvas.width, drawHeight);

lastCoords = coords;

}.bind(this));

}

Anonymous ID: 41aeef July 6, 2022, 4:11 a.m. No.141752   πŸ—„οΈ.is πŸ”—kun   >>1753

>>141751

 

/**

* Add posts to scrollbar

* @param {Element|Array} post div.post

*/

addPosts(post) {

if (Array.isArray(post)) {

post.forEach((p) =this._addPost(p));

} else {

this._addPost(post);

}

this._sortPosts();

this.draw();

}

 

/**

* Add post to post array if not already included

* @param {Element} post div.post

*/

_addPost(post) {

if (this.posts.includes(post)) {

return;

}

this.posts.push(post);

} const color = $(post).css('backgroundColor');

const postRect = post.getBoundingClientRect();

const scrollLocationPercentage =

(window.scrollY + postRect.top) / cachedHeight;

let drawLocation = scrollLocationPercentage * scrollHeight;

 

const overlappingPrevious = lastCoords &&

drawLocation <= (lastCoor

Anonymous ID: 41aeef July 6, 2022, 4:11 a.m. No.141753   πŸ—„οΈ.is πŸ”—kun   >>1754

>>141752

 

this.posts.push(post);

} const color = $(post).css('backgroundColor');

const postRect = post.getBoundingClientRect();

const scrollLocationPercentage =

(window.scrollY + postRect.top) / cachedHeight;

let drawLocation = scrollLocationPercentage * scrollHeight;

 

const overlappingPrevious = lastCoords &&

drawLocation <= (lastCoords.bottom + 2);

if (overlappingPrevious) {

drawLocation = lastCoords.bottom + 4;

}

const drawHeight = Math.max(

(postRect.height / cachedHeight) * scrollHeight,

5,

);

const coords = new ScrollbarCoordinates(drawLocation,

drawLocation + drawHeight);

this.coordsToPost.set(coords, post);

 

ctx.fillStyle = color;

ctx.fillRect(0, drawLocation, canvas.width, drawHeight);

lastCoords = coords;

}.bind(this));

}

 

/**

* Sort posts by time

*/

_sortPosts() {

this.posts.sort(function(p1, p2) {

const p1PostTime = EightKun.getPostTime(p1);

const p2PostTime = EightKun.getPostTime(p2);

if (p1PostTime < p2PostTime) {

return -1;

}

if (p1PostTime p2PostTime) {

return 1;

}

return 0;

});

}

}

ScrollbarNavigation.SHOW_SCROLLBAR_NAV = 'bakertools-show-scrollbar-nav';

 

/**

* Coordinates on

Anonymous ID: 41aeef July 6, 2022, 4:12 a.m. No.141754   πŸ—„οΈ.is πŸ”—kun   >>1755

>>141753

/**

* Coordinates on the scrollbar

*/

class ScrollbarCoordinates {

/**

* Construct coords

* @param {number} top top of rect

* @param {number} bottom top of rect

*/

constructor(top, bottom) {

this.top = top;

this.bottom = bottom;

}

}

 

/ exported debounce, POST_BACKGROUND_CHANGE_EVENT /

/**

* Returns a function, that, as long as it continues to be invoked, will not

* be triggered. The function will be called after it stops being called for

* N milliseconds. If immediate is passed, trigger the function on the

* leading edge, instead of the trailing.

* https://davidwalsh.name/javascript-debounce-function

*

* @param {Function} func

* @param {number} wait

* @param {boolean} immediate

* @return {Function} debounced function

*/

function debounce(func, wait, immediate) {

let timeout;

return function(...args) {

const context = this;

const later = function() {

timeout = null;

if (!immediate) func.apply(context, args);

};

const callNow = immediate && !timeout;

clearTimeout(timeout);

timeout = setTimeout(later, wait);

if (callNow) func.apply(context, args);

};

}

 

const POST_BACKGROUND_CHANGE_EVENT = 'bakertools-post-background-change';

Anonymous ID: 41aeef July 6, 2022, 4:12 a.m. No.141755   πŸ—„οΈ.is πŸ”—kun   >>1756

>>141754

 

this.element.innerHTML = `

<header class="${this.headerClass}">

<h3>${this.linkText}</h3>

<a id="${this.windowCloseId}" class='${this.windowCloseClass}'

href="javascript:void(0)">

<i class="fa fa-times"></i>

</a>

</header>

`;

document.body.appendChild(this.element);

 

$(this.element).resizable({

'handles': 'e, w',

}).draggable();

$(this.element).hide();

 

$('#'+this.windowCloseId).click(function(e) {

this.hide();

}.bind(this));

}

 

/*

* Create CSS styles needed by the window

*/

_createWindowStyles() {

if ($('#' + this.styleId).length

Anonymous ID: 41aeef July 6, 2022, 4:12 a.m. No.141756   πŸ—„οΈ.is πŸ”—kun

>>141755

`;

document.body.appendChild(this.element);

 

$(this.element).resizable({

'handles': 'e, w',

}).draggable();

$(this.element).hide();

 

$('#'+this.windowCloseId).click(function(e) {

this.hide();

}.bind(this));

}

 

/*

Anonymous ID: 41aeef July 6, 2022, 4:12 a.m. No.141757   πŸ—„οΈ.is πŸ”—kun   >>1759

('head').append(`

<style id='${this.styleId}'>

/*

* ui-resizable styles: https://stackoverflow.com/a/11339280

*/

.ui-resizable { position: relative;}

.ui-resizable-handle {

position: absolute;

font-size: 0.1px;

display: block;

}

.ui-resizable-disabled .ui-resizable-handle,

.ui-resizable-autohide .ui-resizable-handle {

display: none;

}

.ui-resizable-n {

cursor: n-resize;

height: 7px;

width: 100%;

top: -5px;

left: 0;

}

.ui-resizable-s {

cursor: s-resize;

height: 7px;

width: 100%;

bottom: -5px;

left: 0;

}

.ui-resizable-e {

cursor: e-resize;

width: 7px;

right: -5px;

top: 0;

height: 100%;

}

Anonymous ID: 41aeef July 6, 2022, 4:13 a.m. No.141758   πŸ—„οΈ.is πŸ”—kun

}

.ui-resizable-w {

cursor: w-resize;

width: 7px;

left: -5px;

top: 0;

height: 100%;

}

.ui-resizable-se {

cursor: se-resize;

width: 12px;

height: 12px;

right: 1px;

bottom: 1px;

}

.ui-resizable-sw {

cursor: sw-resize;

width: 9px;

height: 9px;

left: -5px;

bottom: -5px;

}

.ui-resizable-nw {

cursor: nw-resize;

width: 9px;

height: 9px;

left: -5px;

top: -5px;

}

.ui-resizable-ne {

cursor: ne-resize;

width: 9px;

height: 9px;

right: -5px;

top: -5px;

Anonymous ID: 41aeef July 6, 2022, 4:13 a.m. No.141759   πŸ—„οΈ.is πŸ”—kun   >>1760

>>141757

}

 

.${this.class} {

width: 300px;

background-color: rgb(214, 218, 240);

position: fixed;

z-index: 100;

float: right;

right:28.25px;

border: 1px solid;

}

 

.${this.class} .${this.headerClass} {

background: #98E;

border: solid 1px;

text-align: center;

margin: 0px;

}

 

.${this.class} .${this.headerClass} h3 {

margin: 0;

}

 

.${this.class} .${this.windowCloseClass} {

top: 0px;

right: 0px;

position: absolute;

margin-right: 3px;

font-size: 20px;

}

 

.${this.class} details {

padding: 5px;

}

 

.${this.class} summary {

margin: 0 0 8px;

font-weight: bold;

border-bottom: solid 2px;

}

</style>

Anonymous ID: 41aeef July 6, 2022, 4:13 a.m. No.141760   πŸ—„οΈ.is πŸ”—kun

>>141759

.${this.class} summary {

margin: 0 0 8px;

font-weight: bold;

border-bottom: solid 2px;

}

</style>

`);

}

 

/**

* Create link for show/hiding window, placed in boardlist bar

*/

_setupWindowLink() {

this.link = document.createElement('a');

this.link.textContent = [${this.linkText}];

this.link.style.cssText = 'float: right;';

this.link.title = this.linkText;

this.link.href = 'javascript:void(0)';

$(EightKun.getTopBoardlist()).append(this.link);

 

this.link.onclick = this.toggle.bind(this);

}

 

/**

*

Anonymous ID: 41aeef July 6, 2022, 4:13 a.m. No.141761   πŸ—„οΈ.is πŸ”—kun   >>1762

/**

* Setup timeout for updating bread list

*/

_setupListeners() {

// window.setTimeout(this.updateBreadList, 1000)

}

 

/**

* Show the window

*/

show() {

$(this.element).css({'top': 15});

$(this.element).show();

}

 

/**

* Hide the window

*/

hide() {

$(this.element).hide();

}

 

/**

* Is the window visible?

* @return {boolean} true if window is visible

*/

isVisible() {

return $(this.element).is(':visible');

}

 

/**

* Toggle visibility of window

*/

toggle() {

if (this.isVisible()) {

this.hide();

} else {

this.show();

}

}

}

 

/* exported B

Anonymous ID: 41aeef July 6, 2022, 4:13 a.m. No.141762   πŸ—„οΈ.is πŸ”—kun   >>1763 >>1764

>>141761

/ global NavigationControl, $, WindowElement /

/**

* Baker Window

*/

class BakerWindow extends WindowElement {

/**

* Construct Baker window element, register listeners

*/

constructor() {

super('baker', 'Baker Tools');

this.bakerWindowStyleId = 'bakertools-bakerwindow-style';

this.bakerWindowOptionsId = 'bakertools-window-options';

this.bakerWindowColorOptionsId = 'bakertools-window-color-options';

this.bakerWindowNavigationOptionsId =

'bakertools-window-navigation-options';

this.bakerWindowNotableOptionsId =

'bakertools-window-notable-options';

this.bakerWindowSpamOptionsId =

'bakertools-window-spam-options';

this.bakerWindowNavigationId = 'bakertools-window-navigation';

this.bakerWindowBakerId = 'bakertools-window-baker';

this.bakerWindowBodyId = 'bakertools-bakerwindow-body';

 

this._createStyles();

this._createBody();

}

 

/**

* Create CSS styles needed by the window

*/

_createStyles() {

if ($('#' + this.bakerWindowStyleId).length) {

return;

}

$('head').append(`

<st

Anonymous ID: 41aeef July 6, 2022, 4:14 a.m. No.141763   πŸ—„οΈ.is πŸ”—kun

>>141762

</details>

<details id='${this.bakerWindowSpamOptionsId}' open>

<summary>Spam</summary>

</details>

 

</details>

<details id='${this.bakerWindowNavigationId}' open>

<summary>Navigation</summary>

</details>

<details id='${this.bakerWindowBakerId}' open>

<summary>Baker Tools</summary>

</details>

</form>

`)

Anonymous ID: 41aeef July 6, 2022, 4:14 a.m. No.141764   πŸ—„οΈ.is πŸ”—kun

>>141762

 

/**

* Add form controls to options section of baker window

* @arg {Element} htmlContentString form controls

*/

addOption(htmlContentString) {

$('#'+this.bakerWindowOptionsId).append(htmlContentString);

}

 

/**

* Add form controls to notable options section of baker window

* @arg {Element} htmlContentString form controls

*/

addNotableOption(htmlContentString) {

$('#'+this.bakerWindowNo

Anonymous ID: 41aeef July 6, 2022, 4:14 a.m. No.141765   πŸ—„οΈ.is πŸ”—kun   >>1766

/**

* Add form controls to spam options section of baker window

* @arg {Element} htmlContentString form controls

*/

addSpamOption(htmlContentString) {

$('#'+this.bakerWindowSpamOptionsId)

.append(htmlContentString);

}

 

/**

* Add form controls to navigation options section of baker window

* @arg {Element} htmlContentString form controls

*/

addNavigationOption(htmlContentString) {

$('#'+this.bakerWindowNavigationOptionsId)

.append(htmlContentString);

}

 

/**

Anonymous ID: 41aeef July 6, 2022, 4:14 a.m. No.141766   πŸ—„οΈ.is πŸ”—kun   >>1767

/**

* Add form controls to color options section of baker window

* @arg {Element} htmlContentString form controls

*/

addColorOption(htmlContentString) {

$('#'+this.bakerWindowColorOptionsId).append(htmlContentString);

}

 

/**

* Add html elements to the navigation section of the baker window

* @arg {Element} htmlContentString form controls

*/

addNavigation(htmlContentString) {

$('#'+this.bakerWindowNavigationId).append(htmlContentString);

}

 

/**

* Add html elements to the baker section of the baker window

* @arg {Element} htmlContentString form controls

*/

addBaker(htmlContentString) {

$('#'+this.bakerWindowBakerId).append(htmlContentString);

}

} // end class BakerWindow

BakerWindow.CONTROL_GROUP_CLASS = 'bakertools-bakerwindow-control-group';

BakerWindow.CONTROL_GROUP_SELECTOR =

.${BakerWindow.CONTROL_GROUP_CLASS};

 

/ global $, BakerWindow /

/**

* Blur images unt

 

>>141765

Anonymous ID: 41aeef July 6, 2022, 4:15 a.m. No.141767   πŸ—„οΈ.is πŸ”—kun   >>1768

>>141766

*/

class BlurImages {

/**

* Construct blur images object and setup styles

*/

constructor() {

this.blurImages = 'bakertools-blur-images';

this.blurImagesStyleId = 'bakertools-blur-images-style';

window.bakerTools.mainWindow.addOption(`

<div class='${BakerWindow.CONTROL_GROUP_CLASS}'>

<label for="${this.blurImages}">Blur Images Until Hover</label>

<input type="checkbox" id="${this.blurImages}"

title="Blur images until mouse hover" /></br>

</div>

`);

 

$('#'+this.blurImages).change(function(e) {

this.setBlurImages(e.target.checked);

}.bind(this));

 

this._readSettings();

}

 

/**

* Read settings from localStorage

*/

_readSettings() {

this.setBlurImages(JSON.parse(

localStorage.getItem(

BlurImages.BLUR_IMAGES_SETTING),

));

}

Anonymous ID: 41aeef July 6, 2022, 4:15 a.m. No.141768   πŸ—„οΈ.is πŸ”—kun   >>1769

>>141767

 

/**

* Set whether or not images are blurred

* @param {boolean} blurImages if true, blur images

*/

setBlurImages(blurImages) {

$('#'+this.blurImages).prop('checked',

blurImages);

 

localStorage.setItem(BlurImages.BLUR_IMAGES_SETTING,

blurImages);

 

if (blurImages) {

$(`<style id='${this.blurImagesStyleId}' type='text/css'

.post-image {

filter: blur(5px);

transition: all 233ms;

}

.post-image:hover {

filter: blur(.5px);

transition: all 89ms;

}

</style>`).appendTo('head');

} else {

$(#${this.blurImagesStyleId}).remove();

}

}

}

BlurImages.BLUR_IMAGES_SETTING = 'bakertools-blur-images';

Anonymous ID: 41aeef July 6, 2022, 4:15 a.m. No.141769   πŸ—„οΈ.is πŸ”—kun   >>1770

>>141768

 

/**

* Set whether or not images are blurred

* @param {boolean} blurImages if true, blur images

*/

setBlurImages(blurImages) {

$('#'+this.blurImages).prop('checked',

blurImages);

 

localStorage.setItem(BlurImages.BLUR_IMAGES_SETTING,

blurImages);

 

if (blurImages) {

$(`<style id='${this.blurImagesStyleId}' type='text/css'

.post-image {

filter: blur(5px);

transition: all 233ms;

}

.post-image:hover {

filter: blur(.5px);

transition: all 89ms;

}

</style>`).appendTo('head');

} else {

$(#${this.blurImagesStyleId}).remove();

}

}

}

BlurImages.BLUR_IMAGES_SETTING = 'bakertools-blur-images';

Anonymous ID: 41aeef July 6, 2022, 4:16 a.m. No.141772   πŸ—„οΈ.is πŸ”—kun   >>1773

#${this.breadListTable} th,

#${this.breadListTable} td {

border: 1px solid #000;

border-top: 0;

padding: 1px 2px 1px 2px;

margin: 0;

}

#${this.breadListTable} thead th {

box-shadow: 1px 1px 0 #000;

}

</style>

`);

}

>>141771

 

/**

Anonymous ID: 41aeef July 6, 2022, 4:16 a.m. No.141773   πŸ—„οΈ.is πŸ”—kun   >>1774

>>141772

<th>Group</th>

<th>No.</th>

<th>Bread</th>

<th>replies</th>

</tr>

</thead>

<tbody>

</tbody>

</table>

</div>

<footer>

Last Updated: <span id="${this.lastUpdatedId}"></span>

</footer>

`);

}

 

/**

* Setup timeout for updating bread list

*/

_setupListeners() {

window.setInterval(function(e) {

this.updateBreadList();

}.bind(this), 1000 * 60 * 2.5); // 2.5min update

}

 

/**

* Get the list of breads

*/

updateBreadList() {

this.breads = [];

 

const promises = [];

for (let page = 0; page < 3; page++) {

pro

Anonymous ID: 41aeef July 6, 2022, 4:16 a.m. No.141774   πŸ—„οΈ.is πŸ”—kun   >>1775

>>141773

$.getJSON(this.indexPage + ${page}.json,

this.parseIndex.bind(this)),

);

}

Promise.all(promises).then(function() {

this.breads.sort(function(a, b) {

if (a.lastModified < b.lastModified) return -1;

if (a.lastModified == b.lastModified) return 0;

if (a.lastModified b.lastModified) return 1;

}).reverse();

this.populateBreadTable();

}.bind(this));

}

 

/**

* Parse index json for breads

* @param {Object} index

*/

parseIndex(index) {

if (index && index.threads) {

index.threads.forEach(function(thread) {

const op = thread.posts[0];

const match = op.sub.match(this.breadRegex);

 

if (match) {

const researchGroup = match[1];

const breadNumber = match[2];

const breadName = match[3];

this.breads.push(new Bread(

ResearchBread.BOARD_NAME,

researchGroup,

breadNumber,

breadName,

op.replies,

op.n

Anonymous ID: 41aeef July 6, 2022, 4:17 a.m. No.141775   πŸ—„οΈ.is πŸ”—kun   >>1776

>>141774

*/

populateBreadTable() {

$(#${this.breadListTable} tbody).empty();

this.breads.forEach(function(bread) {

this._addBread(bread);

}.bind(this));

$.getJSON(this.indexPage + ${page}.json,

this.parseIndex.bind(this)),

);

}

Promise.all(promises).then(function() {

this.breads.sort(function(a, b) {

if (a.lastModified < b.lastModified) return -1;

if (a.lastModified == b.lastModified) return 0;

if (a.lastModified b.lastModified) return 1;

}).reverse();

this.populateBreadTable();

}.bind(this));

}

 

/**

* Parse index json for breads

* @param {Object} index

*/

parseIndex(index) {

if (index && index.threads) {

inde

Anonymous ID: 41aeef July 6, 2022, 4:17 a.m. No.141776   πŸ—„οΈ.is πŸ”—kun   >>1777

>>141775

constructor(boardName, researchGroup, researchNumber, breadName,

replies, postId, lastModified) {

this.boardName = boardName;

this.researchGroup = researchGroup;

this.researchNumber = researchNumber;

this.breadName = breadName;

this.replies = replies;

this.postId = postId;

this.lastModified = lastModified;

}