Discussions about user.js
> I have this JS (customized to have no color for my and Q's posts, and no nope buttom; for caps).
https://pastebin.com/Jh4Mqwpj
> It doesn't let me make new threads from the catalog and only the index. Any idea why that'd be?
I suspect that your runq() may be recursive.
have you instrumented any part with console.log()
I am absolutely code illiterate, KEK.
I just found where it had the hex codes and deleted it for the no colors, and found the nope part and deleted it for the no nope button.
I haven't tried to fix it at all, don't know how to.
But in the index, baking is normal and fine with or without the script.
And in the catalog, with the script, clicking on "Create A Thread" doesn't bring up the dialog box.
>>15385 PB
>>14740 PB
Repost from general with addition:
>@Codefag
>Tested the updated user javascript and it looks great.
>Scanned the code and did not see anything troubling.
>(Everyone should study the code for themself; don't rely on me or anyone but yourself.)
-
-
-
-
-
-
*
-
-
-
-
-
>When things are moving fast, I have been known to tag NOPE by accident and then want to reverse it.
So far I haven't figured out how to modify the code to enable this.
-
-
-
-
-
-
*
-
-
-
-
-
Also, download blacklist gets its data from where?
-
-
-
-
-
-
*
-
-
-
-
-
>Appreciate the code! TYVM!
heh.
in previous life, wrote linux kernel code, js is pretty much out of the wheelhouse.
but, code is code, once you understand the underlying engine, and the syntax, everything is possible.
I would suggest wrapping the whole thing in the test like I did, the
if (window.location.pathname.search("/catalog") == -1) {
... your code goes here
}
should turn off anything you are doing when on the catalog.
The NOPE (Blacklist images) I was using before, that includes
(1) blurring out the image using CSS instead of making it completely disappear and
(2) ability to click the blacklisted blurred image and it's removed from the block list & displayed
is this:
/ NOPE /var imageBlacklist = [] ;function loadImageBlacklist() { JSON.parse(localStorage.imageBlacklist || "[]").forEach(addToImageBlacklist); }function saveImageBlacklist() { localStorage.imageBlacklist = JSON.stringify(imageBlacklist); }function addToImageBlacklist(md5) { if (md5 && -1 = imageBlacklist.indexOf(md5)) imageBlacklist.push(md5); }function removeImageFromBlacklist(md5) { var index = imageBlacklist.indexOf(md5); if (-1 ! index) imageBlacklist.splice(index, 1); }function blacklistPostImages(post) { $(post).find('img.post-image').each(function (i, el) { var md5 = el.getAttribute('data-md5'); addToImageBlacklist(md5); $(el).addClass('nope'); }); }function removeBlacklistedImages() { $('img.post-image').each(function (i, el) { if (-1 ! imageBlacklist.indexOf(el.getAttribute('data-md5'))) { $(el).addClass('nope'); } }); }function onNopeClicked(event) { event.preventDefault(); event.stopPropagation(); loadImageBlacklist(); var post = $(event.target).closest('.post'); blacklistPostImages(post); removeBlacklistedImages(); saveImageBlacklist(); }function addNopeButtons() { $('.post').each(function(i, post) { if ($(post).find('.nope').length = 0) { $(post).prepend("<input type='button' class='nope' onClick='onNopeClicked(event)' value='Nope'></input>"); } }) }setInterval(function () { loadImageBlacklist(); removeBlacklistedImages(); addNopeButtons(); }, 1000);$('body').on('click', 'img.nope', function (event) { event.preventDefault(); event.stopPropagation(); $(this).removeClass('nope'); removeImageFromBlacklist(this.getAttribute('data-md5')); saveImageBlacklist(); });/ end NOPE /
and here's the CSS for the above NOPE function, that goes into the THEME section on 8ch options:
img.nope {
filter: grayscale(30%) blur(10px);
overflow: hidden;
max-width: 150px;
max-height: 150px;
}
Gotcha, I've never coded at all, so I'll play around with it later tonight.
If you notice anything that'd be a fix for it, let me know.
I've asked for a while, never really got an answer on why it would be happening.
I just don't understand the JS programming model at all. Opened a file from local storage maintained by my browser, and saved it to local storage maintained by my browser...
I did have to locate the browser's local storage and erase it once, because it got too large from my interactions with 8ch over the 19 months and the browser was thrashing. I probably had more posts than anybody because of meme farming...
yeah, saving to your system doesn't actually change anything about it, and at some point, it will get full. current understanding is the limit is 5meg. in my case, whacking porn and cp with the nope button stops me from accidentally downloading those when I download the bread. in my case the list is only a few 100k. each file id is 64 bytes.
I have some code that when saving images looks to see if the image was seen before. if it was, don't download as it's already here.
I see your logic for a nope button that really whacks the undesirable URLs instead of just blurring them. Agree, that's a better approach for those of us who want to maintain a clean environment.
look into the code for qanon.pub, they have done that heavy lifting, it would prob be easier to port.
qrb-bells-whistles is targeted at general viewing of Q boards, with some visual enhancements. my work is top of someone else's work.
Thanks again codefag! We made a few tweaks to reflect individual needs --
1) Wide right nav area restored to 30 px instead of 10 px
2) PB links color blue. Spouseanon rejected faggoty green, kek.
pbColor: "#0000cc", // previous bread color, dark blue
3) Moved post count to bottom right and larger font
4) Renamed "Spam Free Bread." button to "Spam Fader"
https://pastebin.com/3XS9GtDr
Very happy with this useful tool. Thank you again.
>PB links color blue
recommend using a background color for this instead. I used #ffffbb yellow which looks quite nice.
correct. the items in the array are ids of the image id as stored both as the main image, and the thumbnail, although in different paths.
this is useful to see if you have downloaded the image before if you grab the main link, rather than the second one, which is the name of the uploaded file from the anon's system.
2019-07-24
Updated user.js qrb-bells-whistles.
Rename the "Spam Free Bread" toggle button in the header "Spam Fader".
Source:
https://pastebin.com/2We1Nc2p
Compressed:
https://pastebin.com/jt1WN9pv
$ sha256sum qrb-bells-whistles.js.txt qrb-bells-whistles-190724-0112Z.min
e1da173ca0c40e6c70662b88f23c1a3bd074faf8d879eff850b1907ac9172424 qrb-bells-whistles.js.txt
c92a0c9c2a12103050a116742da6610397a235f86e27ffc03a5601b00d96988e qrb-bells-whistles-190724-0112Z.min
Calling all coderanons:
Get a large external hard drive.
Use it well.
The pot is starting to boil, and historians will want the primary sources later.
2019-07-26
Updated user.js qrb-bells-whistles.
The ordering and display of the toasts, and the post count have been
moved to align on the right side of the window, with the post count
stuck to the bottom right corner of the window. No image size changes
were made, just where the display is presented.
The net effect is that everything now lines up vertically on the
right edge, versus blocks floating on the upper right at the top.
$ sha256sum qrb-bells-whistles.js.txt qrb-bells-whistles-190726-0900Z.min
f68666c3eaf4f535a77103fdf2c76325b26aae43b81fc293783f6a5d1e784779 qrb-bells-whistles.js.txt
85fe05650d9b25ff9df9a4e08958f64cd3646f3ca245f6b12dc88f4f134a858e qrb-bells-whistles-190726-0900Z.min
Compressed:
https://pastebin.com/KJdiAHhC
Source:
https://pastebin.com/EjGtyX9z
How do I make the NOPE button default to "ON"? (First state of toggle button = on)
2019-07-26-2
MOAR
qrb-bells-whistles.js: adjust the horizontal position of the toasts
The previous positioning had it slightly overlapping the post.
anon is always confused, are you sposed to measure once, cut twice, or measure twice and cut once?
whatever, have tested on both dissenter (chrome) and firefox, and the toasts no longer overlap.
$ sha256sum qrb-bells-whistles.js.txt qrb-bells-whistles-190726-1817Z.min
a51d95e9d837c6bf804320a2ff52f207d71554542f4463c7e311332f2734cc1b qrb-bells-whistles.js.txt
98a7a4930087c0723181e6182e86bb7a6789a7533c0db338e4a0f0a0e1b57b62 qrb-bells-whistles-190726-1817Z.min
Compressed:
https://pastebin.com/5jXy0VjE
Source:
https://pastebin.com/41SH6xkN
POTUS talking now says John enjoys wine. Who is the John? I got the impression POTUS was saying ( under his breath) John has a drinking problem or POTUS knows about a problem associated with John's drinking.
2019-07-31
FREASHA TOASTA ONA CONVEYOR, SIGNOR
Was proud of meself for moving the breads all over to the edge of screen, aligned vertically. Looks good methinks. Goes away for a few hours, comes back, and toasts have spilled all over.
Turns out, there was at least one bug in the code that kept up with them, basically, nothing was timing out and leaving the list, the list continued to grow until you refreshed or changed breads.
When a new bread showed up, the toast was appended to the list, at the end, so that made it hard to determine which was the newest, you had to look at the color. I know, not that hard, but when a couple were not adjacent, it was easy to poke the wrong one.
Now, the list is actually timing out, with burnt ones getting tossed. To me though, the big deal is that the new toast is added to the top of the list. This allows you easily judge by the color gradations who is newer, at least I am able to compare visually as they are ordered in descending burntness.
The other bug that I think was present was that a variable was being use that was defined once when the new bread was opened, then a callback was called that used the same name but never initialized it, so may have be reusing the global var that was essentially static.
What I had noticed previously was when moving the sprite over the Q posts at the top of the bread, or even the notable was cause the parser to freak, and all the posts would disappear, only to come back with a refresh/reload. Not sure about this one, as it may have been fixed in the browser.
New Tuning Knobs
toastQuantum: 7200, // 2 hours. NB: Date().getTime() is milliseconds
toastThrottle: 3, // allow non qresearch board to run 3x longer before timing out.
When not on /qresearch, bump the toastQuantum to 6 hours to prevent losing older breads. You can change the multiplier in toastThrottle.
maxToasts: 13, // set this to prevent more toast display than screen real estate.
I have a desktop, so just picked 13 as the max to display. If you can adjust ilower if they still spill over. I don't plan on coding up a way to autocalc how much real estate is available.
$ sha256sum qrb-bells-whistles-190731-1433Z.js.txt qrb-bells-whistles-190731-1433Z.min
7b9d9123d65c292539ffa88ba567912963a7e6177ee31d0bebbc2ddec9c1d684 qrb-bells-whistles-190731-1433Z.js.txt
ebc828c7f72f211a630d0b386d7a6fae7f0e100dc98e8aae8076c741092edda6 qrb-bells-whistles-190731-1433Z.min
Compressed:
https://pastebin.com/jYj3kpyb
Source:
https://pastebin.com/zfK7QkGc
I use the script that combines an older version of Toast (across top) with the "anonsw" side bar, so would appreciate an upgraded Toast version where breads remain across top.
Twitter made a change to their API on July 25th that prevents very useful 3rd party tools from scraping accounts and turning them into RSS for self-hosted feed readers like RSS Owl to consume.
http://twitrss.me/
"2019-07-25: Twitter have changed their UI. For now, user queries should continue to work, as they'll be directed to the mobile version of Twitter. Search queries not so much.
2018-10-17: Twitter are rate limiting requests from TwitRSS.me, meaning it is effectively broken until I can think of a way round it. You can still run your own instance"
[of the code which is available in github]
It's obvious that Twitter's instrumentation wants to know (via cookies, browser fingerprint, IP address, etc.) WHO is accessing each tweet, whether or not they're using a Twitter app and whether or not they're a logged-in Twitter user.
By using the aggregator site and presenting all the tweets in an RSS feed reader app, people like me were somewhat anonymized and able to consume a lot of twitter without touching twitter's website.
Can't anymore. Had to delete all the feeds from my feed reader that were utilizing twitrss.me to convert from twitter handles to RSS.
Can still consume RSS feeds that are generated by various news websites.
RSS was a great idea. I think websites hate it because it enables people to take their published content and display it (or just headlines & URLs -- how much content appears in an RSS feed varies widely from headlines & URLs to 1 graphic to full articles) in a different format without giving the publisher any "eyeballs".
dint work
Wrong color dang it.
Ever edit your JS directly and forget to save the file?
pbColor: "#0000cc", // previous bread color, dark blue
It's a board filter designed to keep URLs from being turned into links. See: https://8ch.net/settings.php?board=qrb
Can anybody give me the real rundown on Cloudflare?
bump