[ home / rules / faq ] [ overboard / sfw / alt ] [ leftypol / edu / siberia / latam / hobby / tech / games / anime / music / draw / AKM ] [ meta ] [ wiki / tv / tiktok / twitter / patreon ] [ GET / ref / marx / booru ]

/meta/ - Ruthless criticism of all that exists (in leftypol.org)

Discussions, querries, feedback and complaints about the site and its administration.
Name
Options
Subject
Comment
Flag
File
Embed
Password(For file deletion.)


File: 1726237523465.png (385.9 KB, 546x438, 1691398510001.png)

 

This thread is only for feedback related to technical issues (bug reports, suggestions).

Mobile Support:
https://github.com/PietroCarrara/Clover/releases/latest
Thread For Mobile Feedback: >>>/tech/6316

Matrix rooms:
https://matrix.to/#/#leftypolPublic:matrix.org

We are currently working on improvements to the site, subject to the need of the tech team to sleep and go to their day jobs. If you need more immediate feedback please join the matrix room[s] and ask around. Feel free to leave comments, concerns, and suggestions about the tech side of the site here and we will try to get to it as soon as possible

Archived thread:
>>>/leftypol_archive/903

Maybe the wrong place, but is there a way to make the Kuroba app download the full non compressed image automatically?

<a onclick="highlightReply('9568', event);" href="/tech/res/6724.html#9568">&gt;&gt;9568</a> &rarr; <a onclick="highlightReply('4951', event);" href="/tech/res/4951.html#4951">&gt;&gt;4951</a><br/><span class="quote"><br/>&gt;This Thread Has Been Re-appropriated for leftypol.org Usage.</span><br/><span class="quote">&gt;General thread meant for the discussion of the mobile app for browsing leftypol.org, known as clover.</span>

<a onclick="highlightReply('6849', event);" href="/tech/res/6724.html#6849">&gt;&gt;6849</a><br/>I can't join matrix server

<a onclick="highlightReply('9591', event);" href="/tech/res/6724.html#9591">&gt;&gt;9591</a><br/>Which link? In OP?<br/>Try this one:<br/><a href="https://matrix.to/#/#Leftypol:matrix.org" rel="nofollow" target="_blank">https://matrix.to/#/#Leftypol:matrix.org</a><br/>Once you're in, find the /tech/ chat if you want.

File: 1625394656509.txt (7.44 KB, userjs.txt)

Updated Options -&gt; User JS <a onclick="highlightReply('6974', event);" href="/tech/res/6724.html#6974">&gt;&gt;6974</a> for the recent backend changes.<br/>① quick reply spoiler <a href="/leftypol_archive/res/903.html#1801">&gt;&gt;&gt;/leftypol_archive/1801</a><br/>② catalog links in div.boardlist <a onclick="highlightReply('9483', event);" href="/tech/res/6724.html#9483">&gt;&gt;9483</a><br/>③ thread stats and Unique IPs <a onclick="highlightReply('6744', event);" href="/tech/res/6724.html#6744">&gt;&gt;6744</a><br/>④ individual post hiding <a onclick="highlightReply('6753', event);" href="/tech/res/6724.html#6753">&gt;&gt;6753</a><br/>⑤ batch loop/once WebM setting <a onclick="highlightReply('6819', event);" href="/tech/res/6724.html#6819">&gt;&gt;6819</a><br/>⑥ top/bottom navlinks in the top bar <a onclick="highlightReply('6835', event);" href="/tech/res/6724.html#6835">&gt;&gt;6835</a><br/>⑦ generic file thumbs in catalog <a onclick="highlightReply('6843', event);" href="/tech/res/6724.html#6843">&gt;&gt;6843</a><br/>⑧ catalog link above OP <a onclick="highlightReply('6916', event);" href="/tech/res/6724.html#6916">&gt;&gt;6916</a><br/>⑨ code double escaping <a onclick="highlightReply('6934', event);" href="/tech/res/6724.html#6934">&gt;&gt;6934</a>

<a onclick="highlightReply('9796', event);" href="/tech/res/6724.html#9796">&gt;&gt;9796</a><br/>One of the devs here, I've got a bit of spare time to solve some of these on the main site now that more critical changes are resolved.<br/>Thanks for compiling and sharing these with everyone.

<a onclick="highlightReply('9797', event);" href="/tech/res/6724.html#9797">&gt;&gt;9797</a><br/><span class="quote">&gt;One of the devs here, I've got a bit of spare time to solve some of these on the main site now that more critical changes are resolved.</span><br/>Thanks for all your hard work.<br/><span class="quote"><br/>&gt;Thanks for compiling and sharing these with everyone.</span><br/>No problem. The last list for the backend is in <a onclick="highlightReply('6841', event);" href="/tech/res/6724.html#6841">&gt;&gt;6841</a>. The backend-relevant updates since that list:<br/>+ code double escaping <a onclick="highlightReply('6933', event);" href="/tech/res/6724.html#6933">&gt;&gt;6933</a><br/>+ issue-125-patch.txt <a onclick="highlightReply('7071', event);" href="/tech/res/6724.html#7071">&gt;&gt;7071</a><br/>+ more iCCP profiles <a onclick="highlightReply('7107', event);" href="/tech/res/6724.html#7107">&gt;&gt;7107</a><br/>+ embed in quick reply <a onclick="highlightReply('7392', event);" href="/tech/res/6724.html#7392">&gt;&gt;7392</a><br/>+ sticky overboard catalog sort <a onclick="highlightReply('9485', event);" href="/tech/res/6724.html#9485">&gt;&gt;9485</a>

please pay attention to meeeeeeee

Is it just me or are all the new image thumbnails broken over the last day or so?

<a onclick="highlightReply('9820', event);" href="/tech/res/6724.html#9820">&gt;&gt;9820</a><br/>Oh, I see what happened&hellip; Whose cocksucking idea was it to start making all thumbnails in Google's gay webp format?

<a onclick="highlightReply('9823', event);" href="/tech/res/6724.html#9823">&gt;&gt;9823</a><br/>What browser are you using that can't handle them, mobile app?

<a onclick="highlightReply('9824', event);" href="/tech/res/6724.html#9824">&gt;&gt;9824</a><br/>An older version of Palemoon. It's not easy for me to upgrade at the moment.

<a onclick="highlightReply('9825', event);" href="/tech/res/6724.html#9825">&gt;&gt;9825</a><br/>Now I'm curious, you must be on a five+ year old version. Is there a breaking change? Increased requirements? Excessive customization?

<a onclick="highlightReply('9828', event);" href="/tech/res/6724.html#9828">&gt;&gt;9828</a><br/>They adopted some new library versions a few months ago that aren't supported on *buntu 16.04. The PPA maintainer seems to have given up supporting that version and it doesn't seem like this will be easy to fix without a full system upgrade (a much more complicated problem for me).

File: 1625436363651.png (15.78 KB, 729x90, ooboontoo.png)

<a onclick="highlightReply('9829', event);" href="/tech/res/6724.html#9829">&gt;&gt;9829</a><br/><span class="quote">&gt;a few</span><br/><span class="spoiler">I wouldn't call over 260 months a few, v26 introduced support.</span> 16.04 LTS is EOL, so I suspect an OS upgrade is increasingly inevitable when things start breaking. Have you tried a live USB on the newer LTS versions?

<a onclick="highlightReply('9830', event);" href="/tech/res/6724.html#9830">&gt;&gt;9830</a><br/>lol typo with the months, meant 60

To fix <a href="/meta/res/979.html#7789">&gt;&gt;&gt;/meta/7789</a> stripped file sizes for the current strip_exif+use_exiftool case:<br/><a href="https://github.com/towards-a-new-leftypol/leftypol_lainchan/blob/e0ff3ea33ba2c81acdeb6bbc1b72ecd15a734be2/post.php#L1094" rel="nofollow" target="_blank">https://github.com/towards-a-new-leftypol/leftypol_lainchan/blob/e0ff3ea33ba2c81acdeb6bbc1b72ecd15a734be2/post.php#L1094</a><br/><pre class='code lang-'>if($error = shell_exec_error('exiftool -overwrite_original -ignoreMinorErrors -q -q -all= ' .&#10; escapeshellarg($file['tmp_name']))) {&#10; error(_('Could not strip EXIF metadata!'), null, $error);&#10;} else {&#10; clearstatcache(true, $file['tmp_name']);&#10; if (($newfilesize = filesize($file['tmp_name'])) !== false)&#10; $file['size'] = $newfilesize;&#10;}</pre><br/>More generally, operations that modify an uploaded file should reread its size.<br/><br/><a href="https://www.php.net/manual/en/function.filesize.php" rel="nofollow" target="_blank">https://www.php.net/manual/en/function.filesize.php</a><br/><a href="https://www.php.net/manual/en/function.clearstatcache.php" rel="nofollow" target="_blank">https://www.php.net/manual/en/function.clearstatcache.php</a>

<a onclick="highlightReply('9830', event);" href="/tech/res/6724.html#9830">&gt;&gt;9830</a><br/><span class="quote">&gt;v26 introduced support</span><br/>Oh? I'm on v28.15 and webp rendering is broken.

Maybe add some escaping <a href="/leftypol_archive/res/903.html#1499">&gt;&gt;&gt;/leftypol_archive/1499</a> to #289 for <a href="/meta/res/979.html#7808">&gt;&gt;&gt;/meta/7808</a>.

File: 1625529717281.png (476.67 KB, 1234x705, ClipboardImage.png)

<a onclick="highlightReply('9851', event);" href="/tech/res/6724.html#9851">&gt;&gt;9851</a><br/>Huh, that's weird then, my mistake. There have been no WebP fixes since 28.15 in updates, and support was introduced in 26.<br/>I downloaded the 29.2.1 binary for 16.04 *ubuntu and it works, but I realize that is different.<br/>Do either of these work? <br/><a href="https://developers.google.com/speed/webp/gallery1" rel="nofollow" target="_blank">https://developers.google.com/speed/webp/gallery1</a><br/><a href="https://developers.google.com/speed/webp/gallery2" rel="nofollow" target="_blank">https://developers.google.com/speed/webp/gallery2</a><br/>(If you don't want to touch Google, you can search for some in <a href="https://commons.wikimedia.org/w/index.php?search=webp" rel="nofollow" target="_blank">https://commons.wikimedia.org/w/index.php?search=webp</a> instead)

<a onclick="highlightReply('9874', event);" href="/tech/res/6724.html#9874">&gt;&gt;9874</a><br/>If you don't want to or can't fix the webp thumbnails, go to Options (top right) and add this script to User JS to replace the thumbnails with the source image.<br/><br/><pre class='code lang-'>ext = [&quot;png&quot;,&quot;jpg&quot;, &quot;jpeg&quot;];&#10;$('.file').each(function(file){&#10; children = this.childNodes;&#10; if (this.tagName == 'DIV'){&#10; link=this.childNodes[1].href;&#10; if (ext.includes(link.split('.').pop())){&#10; this.getElementsByClassName('post-image')[0].src = link;&#10; }}&#10;});</pre><br/><br/>(If someone wants to critique this skiddie hack, please do.)

saving as original filename suddenly doesn't work<br/>tried two browsers on both desktop and mobile

Any chance kuroba can work with Orbot?

<a onclick="highlightReply('9952', event);" href="/tech/res/6724.html#9952">&gt;&gt;9952</a><br/>Thanks for reporting.<br/>We did a change last week that deferred JS loading, which broke a few features (hopefully fixed this weekend).<br/>At the same time, I replaced the download with filename funciton with one that didn't need Javascript, but the way I did it was flawed and lead to a security issue so we quickly removed it.<br/>So we're currently running the deferred one that appears to be broken until enough devs are online to push the new changes.

New update. [code­] tags double-encoding should be fixed.<br/><br/><pre class='code lang-'>&lt;test&gt; &amp;&amp; &quot;test&quot;</pre>

Javascript is fucked, backlinks don't work, the autoupdate and the [Watch Thread] appear twice.

<a onclick="highlightReply('10013', event);" href="/tech/res/6724.html#10013">&gt;&gt;10013</a><br/>The dev team is aware and a fix should be deployed soon.

<a onclick="highlightReply('10014', event);" href="/tech/res/6724.html#10014">&gt;&gt;10014</a><br/>Also whatever the fuck is going on here

<a onclick="highlightReply('10015', event);" href="/tech/res/6724.html#10015">&gt;&gt;10015</a><br/>Yeah, that was trippy. On the dev env I got a quad one once.<br/>Issue should now be resolved.

<a onclick="highlightReply('9891', event);" href="/tech/res/6724.html#9891">&gt;&gt;9891</a><br/>Here's a better version:<br/>[code]<br/>$('div.file a').each(function(index){<br/>let ext = ["png","jpg", "jpeg"];<br/>let file = $(this);<br/>let fullSize = file.prop("href");<br/> if (ext.includes(fullSize.split('.').pop())){<br/> file.find('img').prop("src", fullSize);<br/> }<br/>});<br/>[\code]<br/>the indentation is fucked.

<a onclick="highlightReply('10016', event);" href="/tech/res/6724.html#10016">&gt;&gt;10016</a><br/>Still happens if you open the thread to reply, like using this link: <a href="https://leftypol.org/tech/res/6724.html#q10016" rel="nofollow" target="_blank">https://leftypol.org/tech/res/6724.html#q10016</a>

<span class="quote">&gt;&gt;9986</span><br/>wtf it does work, nvm

File: 1626170899444.txt (6.83 KB, userjs.txt)

Trimmed Options -&gt; User JS <a onclick="highlightReply('9796', event);" href="/tech/res/6724.html#9796">&gt;&gt;9796</a> for the recent backend changes.<br/>① catalog links in div.boardlist <a onclick="highlightReply('9483', event);" href="/tech/res/6724.html#9483">&gt;&gt;9483</a><br/>② thread stats and Unique IPs <a onclick="highlightReply('6744', event);" href="/tech/res/6724.html#6744">&gt;&gt;6744</a><br/>③ individual post hiding <a onclick="highlightReply('6753', event);" href="/tech/res/6724.html#6753">&gt;&gt;6753</a><br/>④ batch loop/once WebM setting <a onclick="highlightReply('6819', event);" href="/tech/res/6724.html#6819">&gt;&gt;6819</a><br/>⑤ top/bottom navlinks in the top bar <a onclick="highlightReply('6835', event);" href="/tech/res/6724.html#6835">&gt;&gt;6835</a><br/>⑥ generic file thumbs in catalog <a onclick="highlightReply('6843', event);" href="/tech/res/6724.html#6843">&gt;&gt;6843</a><br/>⑦ catalog link above OP <a onclick="highlightReply('6916', event);" href="/tech/res/6724.html#6916">&gt;&gt;6916</a>

About <a onclick="highlightReply('10079', event);" href="/tech/res/6724.html#10079">&gt;&gt;10079</a><br/><br/>post_form.html calls rememberStuff <em>very early</em><br/><a href="https://github.com/towards-a-new-leftypol/leftypol_lainchan/blob/5faa622303f7a3d9568a7c89728c3095a664b5c7/templates/post_form.html#L212" rel="nofollow" target="_blank">https://github.com/towards-a-new-leftypol/leftypol_lainchan/blob/5faa622303f7a3d9568a7c89728c3095a664b5c7/templates/post_form.html#L212</a><br/><br/>rememberStuff calls citeReply on q fragments<br/><a href="https://github.com/towards-a-new-leftypol/leftypol_lainchan/blob/5faa622303f7a3d9568a7c89728c3095a664b5c7/templates/main.js#L350" rel="nofollow" target="_blank">https://github.com/towards-a-new-leftypol/leftypol_lainchan/blob/5faa622303f7a3d9568a7c89728c3095a664b5c7/templates/main.js#L350</a><br/><br/>citeReply triggers 'cite'<br/><a href="https://github.com/towards-a-new-leftypol/leftypol_lainchan/blob/5faa622303f7a3d9568a7c89728c3095a664b5c7/templates/main.js#L331" rel="nofollow" target="_blank">https://github.com/towards-a-new-leftypol/leftypol_lainchan/blob/5faa622303f7a3d9568a7c89728c3095a664b5c7/templates/main.js#L331</a><br/><br/>the quick-reply.js 'cite' handler calls show_quick_reply<br/><a href="https://github.com/towards-a-new-leftypol/leftypol_lainchan/blob/5faa622303f7a3d9568a7c89728c3095a664b5c7/js/quick-reply.js#L387" rel="nofollow" target="_blank">https://github.com/towards-a-new-leftypol/leftypol_lainchan/blob/5faa622303f7a3d9568a7c89728c3095a664b5c7/js/quick-reply.js#L387</a><br/><br/>show_quick_reply clones the post form <em>very early</em><br/><a href="https://github.com/towards-a-new-leftypol/leftypol_lainchan/blob/5faa622303f7a3d9568a7c89728c3095a664b5c7/js/quick-reply.js#L132" rel="nofollow" target="_blank">https://github.com/towards-a-new-leftypol/leftypol_lainchan/blob/5faa622303f7a3d9568a7c89728c3095a664b5c7/js/quick-reply.js#L132</a><br/><br/>but the init_file_selector call has been moved from post_form.html to $(document).ready<br/><a href="https://github.com/towards-a-new-leftypol/leftypol_lainchan/blob/5faa622303f7a3d9568a7c89728c3095a664b5c7/js/file-selector.js#L194" rel="nofollow" target="_blank">https://github.com/towards-a-new-leftypol/leftypol_lainchan/blob/5faa622303f7a3d9568a7c89728c3095a664b5c7/js/file-selector.js#L194</a><br/><br/><a href="https://github.com/towards-a-new-leftypol/leftypol_lainchan/commit/ab8b4b95249ab0cfb364cac1dddb267005099a29" rel="nofollow" target="_blank">https://github.com/towards-a-new-leftypol/leftypol_lainchan/commit/ab8b4b95249ab0cfb364cac1dddb267005099a29</a><br/>commit ab8b4b95249ab0cfb364cac1dddb267005099a29<br/>Author: towards-a-new-leftypol &lt;[email protected]&gt;<br/>Date: Sun Jun 27 01:09:28 2021 +0000

<pre class='code lang-'>const callonce_factory = target =&gt; {&#10; let called = false&#10; const once = (…args) =&gt; {&#10; if (!called) {&#10; called = true&#10; return target (…args)&#10; }&#10; }&#10; return once&#10;}&#10;&#10;const init_file_selector_once = callonce_factory (init_file_selector)</pre><br/>This way init_file_selector_once can be harmlessly and cheaply called any number of times, such as at $(document).ready and before show_quick_reply &rarr; clone, without losing any defer-like benefits for the most common case where there's no q fragment.

<a onclick="highlightReply('6724', event);" href="/tech/res/6724.html#6724">&gt;&gt;6724</a><br/>is there a way to automatically decline all legitimate interests cookies from all websites using firefox

When the reply count drops and a recent version of the thread is available, the ids can be diffed:<br/><pre class='code lang-'>&gt;&gt; Array.from (document.querySelectorAll (&quot;div.post.reply&quot;)).map (e =&gt; e.getAttribute ('id').replace (/^reply_/, '')).join (' ')&#10;&quot;6727 …&quot;&#10;&#10;$ diffids () { diff &lt;(echo &quot;$1&quot; | tr ' ' '\n') &lt;(echo &quot;$2&quot; | tr ' ' '\n'); }&#10;$ diffids &quot;6727 …&quot; &quot;6727 …&quot;&#10;140d139&#10;&lt; 9986&#10;151a151&#10;&gt; 10226</pre><br/>In this case the logs <a href="https://leftypol.org/log.php?board=tech" rel="nofollow" target="_blank">https://leftypol.org/log.php?board=tech</a> suggest 9986 was probably in "Deleted all posts by IP address".

Duplicate scripts:<br/><pre class='code lang-'>&gt;&gt; console.log (Object.entries (Array.from (document.getElementsByTagName (&quot;script&quot;)).filter (e =&gt; e.hasAttribute (&quot;src&quot;)).map (e =&gt; e.getAttribute (&quot;src&quot;)).reduce ((acc, name, idx) =&gt; {&#10; if (name in acc) {&#10; acc [name].push (idx)&#10; } else {&#10; acc [name] = [idx]&#10; }&#10; return acc&#10;}, {})).filter (([name, indices]) =&gt; indices.length &gt; 1).sort ((a, b) =&gt; a [1] [0] - b [1] [0]).map (([name, indices]) =&gt; name + ' ' + indices.toString ()).join ('\n'))&#10;&#10;/js/jquery.min.js 1,3&#10;/js/inline-expanding.js 2,5</pre><br/>The source of the problem is this duplication:<br/><a href="https://github.com/towards-a-new-leftypol/leftypol_lainchan/blob/5faa622303f7a3d9568a7c89728c3095a664b5c7/inc/config.php#L1039" rel="nofollow" target="_blank">https://github.com/towards-a-new-leftypol/leftypol_lainchan/blob/5faa622303f7a3d9568a7c89728c3095a664b5c7/inc/config.php#L1039</a><br/><a href="https://github.com/towards-a-new-leftypol/leftypol_lainchan/blob/5faa622303f7a3d9568a7c89728c3095a664b5c7/inc/instance-config.php#L375" rel="nofollow" target="_blank">https://github.com/towards-a-new-leftypol/leftypol_lainchan/blob/5faa622303f7a3d9568a7c89728c3095a664b5c7/inc/instance-config.php#L375</a><br/><br/>While two jquery.min only slow page loads, the two inline-expanding cause double registration of listeners and duplicate options gui spans.

<a href="https://github.com/towards-a-new-leftypol/leftypol_lainchan/issues/326" rel="nofollow" target="_blank">https://github.com/towards-a-new-leftypol/leftypol_lainchan/issues/326</a><br/><span class="quote">&gt; Multiple features in the Options dialog appear to be broken #326 </span><br/><span class="quote">&gt; The first three options appear to have no effect and do not store a value when activated.</span><br/><span class="quote">&gt; Show relative time</span><br/><br/>After the page has loaded with scripts enabled the inspector can be used to verify that '#show-relative-time&gt;input' has no listener. The listener is added in:<br/><a href="https://github.com/towards-a-new-leftypol/leftypol_lainchan/blob/5faa622303f7a3d9568a7c89728c3095a664b5c7/js/local-time.js#L91" rel="nofollow" target="_blank">https://github.com/towards-a-new-leftypol/leftypol_lainchan/blob/5faa622303f7a3d9568a7c89728c3095a664b5c7/js/local-time.js#L91</a><br/><span class="quote">&gt; $('#show-relative-time&gt;input').on('change', function() {</span><br/><br/>Setting a breakpoint on that line shows that $('#show-relative-time&gt;input') is empty, so the listener is added to nothing. One way to fix this is to retrieve the input from the options tab instead of the document:<br/><span class="orangeQuote">&lt; Options.get_tab ('general').content.find ('#show-relative-time&gt;input').on('change', function() {</span><br/><br/>I don't know whether this is the only fix needed for js/local-time.js, that needs to be retested after the listener is in place. A similar consideration applies to every script that has been moved from onready to $(document).ready and attempts to retrieve options gui elements after an Options.extend_tab or equivalent call.<br/><br/><a href="https://github.com/towards-a-new-leftypol/leftypol_lainchan/commit/88f6088a429fb73d12805377b43c6b567d03a5db" rel="nofollow" target="_blank">https://github.com/towards-a-new-leftypol/leftypol_lainchan/commit/88f6088a429fb73d12805377b43c6b567d03a5db</a><br/><span class="quote">&gt; fix Relative Time and Image Throttler</span><br/><span class="quote">&gt; Author: marktaiwan &lt;[email protected]&gt;</span><br/><span class="quote">&gt; Date: Fri Jan 23 00:03:37 2015 +0800</span><br/><span class="quote">&gt; marktaiwan authored and czaks committed May 5, 2016</span>

The reason $('#show-relative-time&gt;input') is empty <a onclick="highlightReply('10393', event);" href="/tech/res/6724.html#10393">&gt;&gt;10393</a> is that js/options.js adds its gui to the document at $(document).ready<br/><a href="https://github.com/towards-a-new-leftypol/leftypol_lainchan/blob/5faa622303f7a3d9568a7c89728c3095a664b5c7/js/options.js#L105" rel="nofollow" target="_blank">https://github.com/towards-a-new-leftypol/leftypol_lainchan/blob/5faa622303f7a3d9568a7c89728c3095a664b5c7/js/options.js#L105</a><br/>but it's placed after some scripts that add options in $config['additional_javascript']<br/><a href="https://github.com/towards-a-new-leftypol/leftypol_lainchan/blob/5faa622303f7a3d9568a7c89728c3095a664b5c7/inc/instance-config.php#L393" rel="nofollow" target="_blank">https://github.com/towards-a-new-leftypol/leftypol_lainchan/blob/5faa622303f7a3d9568a7c89728c3095a664b5c7/inc/instance-config.php#L393</a><br/><br/>The only reason js/local-time.js and its friends even find a general tab is that js/options/general.js adds it at the time of head:<br/><a href="https://github.com/towards-a-new-leftypol/leftypol_lainchan/blob/5faa622303f7a3d9568a7c89728c3095a664b5c7/js/options/general.js#L15" rel="nofollow" target="_blank">https://github.com/towards-a-new-leftypol/leftypol_lainchan/blob/5faa622303f7a3d9568a7c89728c3095a664b5c7/js/options/general.js#L15</a>

<a href="https://github.com/towards-a-new-leftypol/leftypol_lainchan/issues/326" rel="nofollow" target="_blank">https://github.com/towards-a-new-leftypol/leftypol_lainchan/issues/326</a><br/><span class="quote">&gt; Number of simultaneous image downloads (0 to disable):</span><br/><br/>Besides being run <a onclick="highlightReply('10389', event);" href="/tech/res/6724.html#10389">&gt;&gt;10389</a> twice, js/inline-expanding.js has the same no listener issue <a onclick="highlightReply('10393', event);" href="/tech/res/6724.html#10393">&gt;&gt;10393</a> because $('#inline-expand-max input') is empty.<br/><a href="https://github.com/towards-a-new-leftypol/leftypol_lainchan/blob/5faa622303f7a3d9568a7c89728c3095a664b5c7/js/inline-expanding.js#L196" rel="nofollow" target="_blank">https://github.com/towards-a-new-leftypol/leftypol_lainchan/blob/5faa622303f7a3d9568a7c89728c3095a664b5c7/js/inline-expanding.js#L196</a><br/><br/>One fix is:<br/><span class="orangeQuote">&lt; Options.get_tab ('general').content.find ('#inline-expand-max input')</span>

<a href="https://github.com/towards-a-new-leftypol/leftypol_lainchan/issues/326" rel="nofollow" target="_blank">https://github.com/towards-a-new-leftypol/leftypol_lainchan/issues/326</a><br/><span class="quote">&gt; Scroll to new posts</span><br/><br/>js/auto-scroll.js has the same issue <a onclick="highlightReply('10393', event);" href="/tech/res/6724.html#10393">&gt;&gt;10393</a> <a onclick="highlightReply('10414', event);" href="/tech/res/6724.html#10414">&gt;&gt;10414</a> with $('#autoScroll') being empty.<br/><a href="https://github.com/towards-a-new-leftypol/leftypol_lainchan/blob/6fecd8e004fa5618ed5b97b1162ad343c274fd00/js/auto-scroll.js#L5" rel="nofollow" target="_blank">https://github.com/towards-a-new-leftypol/leftypol_lainchan/blob/6fecd8e004fa5618ed5b97b1162ad343c274fd00/js/auto-scroll.js#L5</a><br/><br/>Additionally it expects to find $('span[id="updater"]')<br/><a href="https://github.com/towards-a-new-leftypol/leftypol_lainchan/blob/6fecd8e004fa5618ed5b97b1162ad343c274fd00/js/auto-scroll.js#L18" rel="nofollow" target="_blank">https://github.com/towards-a-new-leftypol/leftypol_lainchan/blob/6fecd8e004fa5618ed5b97b1162ad343c274fd00/js/auto-scroll.js#L18</a><br/>but that is added by js/auto-reload.js<br/><a href="https://github.com/towards-a-new-leftypol/leftypol_lainchan/blob/6fecd8e004fa5618ed5b97b1162ad343c274fd00/js/auto-reload.js#L115" rel="nofollow" target="_blank">https://github.com/towards-a-new-leftypol/leftypol_lainchan/blob/6fecd8e004fa5618ed5b97b1162ad343c274fd00/js/auto-reload.js#L115</a><br/>which is both tardy and deferred.<br/><a href="https://github.com/towards-a-new-leftypol/leftypol_lainchan/blob/6fecd8e004fa5618ed5b97b1162ad343c274fd00/inc/instance-config.php#L401" rel="nofollow" target="_blank">https://github.com/towards-a-new-leftypol/leftypol_lainchan/blob/6fecd8e004fa5618ed5b97b1162ad343c274fd00/inc/instance-config.php#L401</a>

When testing with scripts enabled, cloudflare's injected malware can be avoided by blocking leftypol URLs that contain "/cdn-cgi/".

Thanks for all your help with this, I'm going to start making pull requests over the next few days.<br/><br/><a onclick="highlightReply('10109', event);" href="/tech/res/6724.html#10109">&gt;&gt;10109</a><br/>Would you consider this an ideal solution for us to implement, or a simple and effective bandaid for our short-sighted $(document).ready changes? Is it sane for us to be in this situation where it is called multiple times?

<a onclick="highlightReply('10421', event);" href="/tech/res/6724.html#10421">&gt;&gt;10421</a><br/>That is certainly only a quickfix, but a very cheap one because after the first call it will immediately return on a boolean test. A more pleasing long-term solution would be for the rememberStuff chain not to trigger 'cite' that early and instead cause a delayed 'cite' to fire at the time of $(document).ready, but this way great care must be taken with the order in which things run.<br/><br/>Also, I see that PR #330 has been approved and its commit merged but the duplicate scripts are still being served as I'm writing this.

<a onclick="highlightReply('10429', event);" href="/tech/res/6724.html#10429">&gt;&gt;10429</a><br/><a onclick="highlightReply('10429', event);" href="/tech/res/6724.html#10429">&gt;&gt;10429</a><br/>We're testing bb. One sec.

File: 1627126740264.png (9.16 KB, 454x122, ClipboardImage.png)

<a onclick="highlightReply('10429', event);" href="/tech/res/6724.html#10429">&gt;&gt;10429</a><br/><span class="quote">&gt;Also, I see that PR #330 has been approved and its commit merged but the duplicate scripts are still being served as I'm writing this.</span><br/>Yep, merge happens before final testing, before they go live.<br/>I can confirm it removes the duplication in the Option form.<br/><span class="quote"><br/>&gt;That is certainly only a quickfix [snip]</span><br/>I'm happy with adding that, it's safe and effective. I might aim for the better solution once we've finished fixing the fallout from our speed-improvement changes and downstreaming the years of vichan changes that lainchan ignored.

<a href="https://github.com/towards-a-new-leftypol/leftypol_lainchan/issues/318" rel="nofollow" target="_blank">https://github.com/towards-a-new-leftypol/leftypol_lainchan/issues/318</a><br/><span class="quote">&gt; Syncronize spoiler button state on quick reply and main post form #318 </span><br/><br/>While looking into this the synchronization section of js/quick-reply.js turns out to be quite peculiar.<br/><a href="https://github.com/towards-a-new-leftypol/leftypol_lainchan/blob/dcf92dfef5f5ab900dc879d7dc4c3f04fab0aed8/js/quick-reply.js#L296" rel="nofollow" target="_blank">https://github.com/towards-a-new-leftypol/leftypol_lainchan/blob/dcf92dfef5f5ab900dc879d7dc4c3f04fab0aed8/js/quick-reply.js#L296</a><br/>Every time the quick reply form is manually closed and reopened, new listeners are installed on the forms and the window, but the old listeners are never cleared in the .close-btn click handler.<br/><a href="https://github.com/towards-a-new-leftypol/leftypol_lainchan/blob/dcf92dfef5f5ab900dc879d7dc4c3f04fab0aed8/js/quick-reply.js#L348" rel="nofollow" target="_blank">https://github.com/towards-a-new-leftypol/leftypol_lainchan/blob/dcf92dfef5f5ab900dc879d7dc4c3f04fab0aed8/js/quick-reply.js#L348</a><br/><br/>The effect can be observed on elements of the top form, such as the textarea, for which the inspector shows an ever increasing number of listeners. These keep the closed quick reply forms reachable and therefore uncollectable, leaking memory. They also transfer the top form text to each closed quick reply form, and after a sufficient number typing becomes sluggish. The .close-btn click handler should deregister all listeners that only served the closed quick reply form.<br/><br/>Keeping in mind that the current way of doing things leaks memory with abandon, the spoiler checkboxes can be synced by extending the synchronization section:<br/><pre class='code lang-'>const cbsync = (form1, form2, name) =&gt; {&#10; const sel = 'input[type=&quot;checkbox&quot;][name=&quot;' + name + '&quot;]'&#10; const cb1 = form1.find (sel)&#10; const cb2 = form2.find (sel)&#10; cb1.on ('change', () =&gt; {&#10; cb2.prop ('checked', cb1.prop ('checked'))&#10; })&#10; cb2.on ('change', () =&gt; {&#10; cb1.prop ('checked', cb2.prop ('checked'))&#10; })&#10;}&#10;&#10;cbsync ($origPostForm, $postForm, 'spoiler')</pre>

<a onclick="highlightReply('10441', event);" href="/tech/res/6724.html#10441">&gt;&gt;10441</a><br/><span class="quote">&gt;Every time the quick reply form is manually closed and reopened, new listeners are installed on the forms and the window, but the old listeners are never cleared in the .close-btn click handler.</span><br/>It looks adding these two .off() lines fixes it correctly:<br/><pre class='code lang-'>&#9;&#9;$postForm.find('th .close-btn').click(function() {&#10;&#9;&#9;&#9;// Remove origPostForm listeners&#10;&#9;&#9;&#9;$origPostForm.find('textarea[name=&quot;body&quot;]').off('change input propertychange focus');&#10;&#9;&#9;&#9;$origPostForm.find('input[type=&quot;text&quot;],select').off('change input propertychange');</pre>

<a onclick="highlightReply('10444', event);" href="/tech/res/6724.html#10444">&gt;&gt;10444</a><br/>That removes every listener for those events from those elements, not just those added by js/quick-reply.js. Currently there are no others, but in the future that might remove some other script's listeners. To avoid this the events can be namespaced with something like <em>.quickreply</em> in both <em>on</em> and <em>off</em> calls.<br/><a href="https://api.jquery.com/on/#event-names" rel="nofollow" target="_blank">https://api.jquery.com/on/#event-names</a><br/><span class="quote"><br/>&gt; &gt; new listeners are installed on the forms <span class="underline">and the window</span> <a onclick="highlightReply('10441', event);" href="/tech/res/6724.html#10441">&gt;&gt;10441</a></span><br/>This scroll handler on the window<br/><a href="https://github.com/towards-a-new-leftypol/leftypol_lainchan/blob/dcf92dfef5f5ab900dc879d7dc4c3f04fab0aed8/js/quick-reply.js#L363" rel="nofollow" target="_blank">https://github.com/towards-a-new-leftypol/leftypol_lainchan/blob/dcf92dfef5f5ab900dc879d7dc4c3f04fab0aed8/js/quick-reply.js#L363</a><br/>needs to be deregistered as well on .close-btn click because it keeps the old $postForm reachable and therefore uncollectable.<br/><br/>This stylesheet handler on the window<br/><a href="https://github.com/towards-a-new-leftypol/leftypol_lainchan/blob/dcf92dfef5f5ab900dc879d7dc4c3f04fab0aed8/js/quick-reply.js#L375" rel="nofollow" target="_blank">https://github.com/towards-a-new-leftypol/leftypol_lainchan/blob/dcf92dfef5f5ab900dc879d7dc4c3f04fab0aed8/js/quick-reply.js#L375</a><br/>needs the same treatment. Alternatively it could be added exactly once <a onclick="highlightReply('10109', event);" href="/tech/res/6724.html#10109">&gt;&gt;10109</a>, since it doesn't depend on the $postForm, but in that case it must be moved out of show_quick_reply.<br/><br/>This 'quick-reply' handler on the window<br/><a href="https://github.com/towards-a-new-leftypol/leftypol_lainchan/blob/dcf92dfef5f5ab900dc879d7dc4c3f04fab0aed8/js/quick-reply.js#L414" rel="nofollow" target="_blank">https://github.com/towards-a-new-leftypol/leftypol_lainchan/blob/dcf92dfef5f5ab900dc879d7dc4c3f04fab0aed8/js/quick-reply.js#L414</a><br/>is added anew on every floating_link call, which occurs on every .close-btn click. It needs to be added at most once. <a onclick="highlightReply('10109', event);" href="/tech/res/6724.html#10109">&gt;&gt;10109</a>

Here's a cleanup_jquery_listeners utility function:<br/><pre class='code lang-'>const cleanup_jquery_listeners = cleanupspec =&gt; {&#10; // cleanupspec is a list of triples of&#10; // [jquery sets, selector or null, event string]&#10; // example: [&#10; // [[$origPostForm, $postForm], 'input[type=&quot;text&quot;],select', '.quickreply'],&#10; // [[$(window)], null, 'scroll.quickreply']&#10; // ]&#10; for (const [sets, sel, events] of cleanupspec) {&#10; for (let oneset of sets) {&#10; if (sel != null) {&#10; oneset = oneset.find (sel)&#10; }&#10; oneset.off (events)&#10; }&#10; }&#10;}</pre><br/>Then in .close-btn click:<br/><pre class='code lang-'>const spec = [&#10; [[$origPostForm, $postForm], 'textarea[name=&quot;body&quot;]', '.quickreply'],&#10; [[$origPostForm, $postForm], 'input[type=&quot;text&quot;],select', '.quickreply'],&#10; [[$(window)], null, 'scroll.quickreply'],&#10; [[$postForm], 'th .close-btn', 'click.quickreply'],&#10;]&#10;&#10;cleanup_jquery_listeners (spec)</pre><br/>The $postForm is cleaned up for completeness. When spoilers are synced <a onclick="highlightReply('10441', event);" href="/tech/res/6724.html#10441">&gt;&gt;10441</a> they can be added to the spec list in the obvious way. All <em>on</em> calls need .quickreply on their events. The click, focus and scroll calls become .on('click.quickreply', &hellip;) and equivalent. The exceptions are the last two listeners of <a onclick="highlightReply('10455', event);" href="/tech/res/6724.html#10455">&gt;&gt;10455</a> which can be dealt with using callonce_factory <a onclick="highlightReply('10109', event);" href="/tech/res/6724.html#10109">&gt;&gt;10109</a>.

<a onclick="highlightReply('10109', event);" href="/tech/res/6724.html#10109">&gt;&gt;10109</a><br/>Should the callonce factory be placed in main.js?

For the last two listeners of <a onclick="highlightReply('10455', event);" href="/tech/res/6724.html#10455">&gt;&gt;10455</a>, inside the outermost function of js/quick-reply.js:<br/><pre class='code lang-'>const stylesheet_handler_once = callonce_factory (() =&gt; {&#10; $(window).on('stylesheet', function() {&#10; do_css();&#10; if ($('link#stylesheet').attr('href')) {&#10; $('link#stylesheet')[0].onload = do_css;&#10; }&#10; });&#10;})&#10;&#10;const qr_handler_once = callonce_factory (() =&gt; {&#10; $(window).on('quick-reply', function() {&#10; $('.quick-reply-btn').remove();&#10; });&#10;})</pre><br/>Then replace<br/><a href="https://github.com/towards-a-new-leftypol/leftypol_lainchan/blob/dcf92dfef5f5ab900dc879d7dc4c3f04fab0aed8/js/quick-reply.js#L375" rel="nofollow" target="_blank">https://github.com/towards-a-new-leftypol/leftypol_lainchan/blob/dcf92dfef5f5ab900dc879d7dc4c3f04fab0aed8/js/quick-reply.js#L375</a><br/>with<br/><span class="orangeQuote">&lt; stylesheet_handler_once ()</span><br/>and replace<br/><a href="https://github.com/towards-a-new-leftypol/leftypol_lainchan/blob/dcf92dfef5f5ab900dc879d7dc4c3f04fab0aed8/js/quick-reply.js#L414" rel="nofollow" target="_blank">https://github.com/towards-a-new-leftypol/leftypol_lainchan/blob/dcf92dfef5f5ab900dc879d7dc4c3f04fab0aed8/js/quick-reply.js#L414</a><br/>with<br/><span class="orangeQuote">&lt; qr_handler_once ()</span><br/><br/><a onclick="highlightReply('10486', event);" href="/tech/res/6724.html#10486">&gt;&gt;10486</a><br/>Either templates/main.js or a new js/functools.js, entirely at the techs' option.

Temporary fix for spoiler sync #318 in Options -&gt; User JS until the backend is fixed <a onclick="highlightReply('10441', event);" href="/tech/res/6724.html#10441">&gt;&gt;10441</a>.<br/><pre class='code lang-'>(() =&gt; {&#10; const cbsync = (form1, form2, name) =&gt; {&#10; const sel = 'input[type=&quot;checkbox&quot;][name=&quot;' + name + '&quot;]'&#10; const cb1 = form1.find (sel)&#10; const cb2 = form2.find (sel)&#10; cb1.on ('change', () =&gt; {&#10; cb2.prop ('checked', cb1.prop ('checked'))&#10; })&#10; cb2.on ('change', () =&gt; {&#10; cb1.prop ('checked', cb2.prop ('checked'))&#10; })&#10; }&#10; const spoilersync = () =&gt; {&#10; const ftop = $('form[name=&quot;post&quot;]:first')&#10; const fquick = $('#quick-reply')&#10; if ((ftop.length != 1) || (fquick.length != 1)) { return; }&#10; if (fquick.attr ('data-userjs-spoilersync') == 'spoilersync') { return; }&#10; cbsync (ftop, fquick, 'spoiler')&#10; fquick.attr ('data-userjs-spoilersync', 'spoilersync')&#10; }&#10; spoilersync ()&#10; $(window).on('quick-reply', spoilersync)&#10;})()</pre>

Temporary fix for <a onclick="highlightReply('10079', event);" href="/tech/res/6724.html#10079">&gt;&gt;10079</a> in Options -&gt; User JS until the backend is fixed <a onclick="highlightReply('10104', event);" href="/tech/res/6724.html#10104">&gt;&gt;10104</a> <a onclick="highlightReply('10109', event);" href="/tech/res/6724.html#10109">&gt;&gt;10109</a>.<br/><pre class='code lang-'>$('#quick-reply input[name=&quot;file&quot;]').remove ()</pre>

File: 1627344936998.txt (7.71 KB, userjs.txt)

Updated Options -&gt; User JS <a onclick="highlightReply('10101', event);" href="/tech/res/6724.html#10101">&gt;&gt;10101</a> with the current fixes.<br/>① catalog links in div.boardlist <a onclick="highlightReply('9483', event);" href="/tech/res/6724.html#9483">&gt;&gt;9483</a><br/>② thread stats and Unique IPs <a onclick="highlightReply('6744', event);" href="/tech/res/6724.html#6744">&gt;&gt;6744</a><br/>③ individual post hiding <a onclick="highlightReply('6753', event);" href="/tech/res/6724.html#6753">&gt;&gt;6753</a><br/>④ batch loop/once WebM setting <a onclick="highlightReply('6819', event);" href="/tech/res/6724.html#6819">&gt;&gt;6819</a><br/>⑤ top/bottom navlinks in the top bar <a onclick="highlightReply('6835', event);" href="/tech/res/6724.html#6835">&gt;&gt;6835</a><br/>⑥ generic file thumbs in catalog <a onclick="highlightReply('6843', event);" href="/tech/res/6724.html#6843">&gt;&gt;6843</a><br/>⑦ catalog link above OP <a onclick="highlightReply('6916', event);" href="/tech/res/6724.html#6916">&gt;&gt;6916</a><br/>⑧ quick reply spoiler sync <a onclick="highlightReply('10493', event);" href="/tech/res/6724.html#10493">&gt;&gt;10493</a><br/>⑨ quick reply before init_file_selector <a onclick="highlightReply('10494', event);" href="/tech/res/6724.html#10494">&gt;&gt;10494</a>

links like <a href="https://leftychan.net/leftypol" rel="nofollow" target="_blank">https://leftychan.net/leftypol</a> don't work anymore

<span class="quote">&gt;extremely basic pull requests in queue for weeks</span><br/><span class="quote">&gt;one of three devs remaining</span><br/>._.

Threads are having the old issue where posts don't immediately show up when you update.

>>34666
Now that we have more active devs and most of the basic necessities are set up, I'll request to the dev team that this become a priority fix.

btw filename download should now be fixed.

>>34649
auto-update.js is no longer deferred or tardy. This appears to have fixed the reliability issues with that script in normal use.
Thank you, once again.

>> console.log ((lines => lines.join ('\n') + '\nentries: ' + lines.length) (Object.entries (Array.from (document.getElementsByTagName ("script")).filter (e => e.hasAttribute ("src")).map (e => e.getAttribute ("src")).reduce ((acc, name, idx) => {
  if (name in acc) {
    acc [name].push (idx)
  } else {
    acc [name] = [idx]
  }
  return acc
}, {})).filter (([name, indices]) => indices.length > 1).sort ((a, b) => a [1] [0] - b [1] [0]).map (([name, indices]) => name + ' ' + indices.toString ())))

entries: 0


👍 >>34645 👍

I see that your post transfer method replaced some deleted file entries with generic file entries, so users will get legitimate but probably unexpected 404s.

>>>/meta/979

>>34670
That is strange, I'm not exactly sure what caused that.
The transfer method was a very rushed effort (for another example, flags were mistakenly added to 'body' instead of 'body_nomarkup').

>>34668
Update: this appears to be false, only part of the problem has been fixed. Work on this is continuing.

The post transfer method seems to have assigned the virtual thumbnail's dimensions to each spoiler image, leading to stretched spoilers like >>>/anime/8489 >>>/anime/8560. To remove the dimensions from such spoilers and show them at their natural size:
Array.from (document.querySelectorAll ("div.files > div.file img.post-image")).filter (e => e.hasAttribute ("src") && /^\/static\/.*spoiler/i.test (e.getAttribute ("src")) && e.hasAttribute ("style") && /^width:[0-9]*px;height:[0-9]*px;?$/i.test (e.getAttribute ("style").replace (/\s+/g, ''))).forEach (e => { e.removeAttribute ("style"); })

I believe I have found the true cause of the auto-update issue after making a new post, a regression caused by an absolute hack of a commit from January.

>>34673
thanks devanon.

We're in a shortage of SEA communist flags (only Kampuchea, Vietnam). No Thai, no Pathet Lao, no Malay Communists, not even PKI is in the list currently.
Can you mods add those?

>>34648
>>34649
You mention $('#inline-expand-max-input') and $('#autoScroll') as being empty and I've seen this issue in a few other cases (leading to things like a broken filter tab). Do you know what could cause them not to be found despite being generated immediately earlier? It feels like there must be something we messed up that causes them all not to work any more.
Otherwise I can patch the issue per-case with that 'find' fix you suggested.

>>34676
>Do you know what could cause them not to be found despite being generated immediately earlier?
This is explained in >>34647. The options gui elements are only added to the global document in the $(document).ready of js/options.js. Prior to that they cannot be retrieved from the global document because they are only in the tabs, which go into options_div, which goes into options_handler, which is not yet in the global document. Js/options.js is effectively an undeclared order dependency of js/local-time.js >>34646 js/inline-expanding.js >>34648 js/auto-scroll.js >>34649 and their friends, but it's placed too late in $config['additional_javascript'] >>34647.

>Otherwise I can patch the issue per-case with that 'find' fix you suggested.

The main advantage of retrieving the options gui elements from the tabs instead of the document is to remove the undeclared order dependence on js/options.js, which if preserved may come back to bite you in the future.

This question is probably better asked here than /meta/, where should leftypol.org create its Git version management?
I'm sure we can all agree on 'fuck GitHub'. Personally I would prefer a site that has no external connections/trackers and allows use without enabling JavaScript.
What would be the pros and cons of various platforms?

Current suggestions:
>self-hosted - Gitea instance on leftypol.org
>0xacab.org (GitLab, explicitly leftist, has onion, requires JS)
>disroot.org (Gitea instance, explicitly leftist, no onion)
>codeberg.org (popular, no onion)

Scripts usually declare their optional dependencies with //.
$ head -n 14 js/local-time.js
/*
 * local-time.js
 * https://github.com/savetheinternet/Tinyboard/blob/master/js/local-time.js
 *
 * Released under the MIT license
 * Copyright (c) 2012 Michael Save <[email protected]>
 * Copyright (c) 2013-2014 Marcin Łabanowski <[email protected]>
 *
 * Usage:
 *   // $config['additional_javascript'][] = 'js/jquery.min.js';
 *   // $config['additional_javascript'][] = 'js/strftime.min.js';
 *   $config['additional_javascript'][] = 'js/local-time.js';
 *
 */

But jquery-ui.custom in quick-reply uses verbiage instead.
$ grep -F -ne "\$config['additional_javascript'][]" -r js | grep -e ';.\+'
js/quick-reply.js:11: *   $config['additional_javascript'][] = 'js/jquery-ui.custom.min.js'; // Optional; if you want the form to be draggable.
js/show-backlinks.js:11: *   // $config['additional_javascript'][] = 'js/post-hover'; (optional; must come first)

It should be switched to // for consistency and automation.

>>34678
The sources can be seen from anywhere by cloning and pulling, but if the site requires JS then I won't be able to see ancillary features like issues and PRs. Currently GitHub has the best feature set available without JS, so by this specific criterion it's the best option, regardless of our feelings about Microsoft.

Here's an alpha version of a tool that checks the consistency of the ordering restrictions declared by individual scripts against the order in instance-config.php's $config['additional_javascript']. Ideally individual scripts would declare complete and correct ordering restrictions, but this doesn't hold >>34677 in practice, so this tool can only provide a hint. It currently checks for:
- duplicates in $config['additional_javascript']
- unsatisfied dependencies that are not marked optional with // >>34679
- order reversals in individual scripts versus $config['additional_javascript']
- satisfiability of the full ordering restriction graph if all scripts were to be included
Here's a wrapper that sets up the grep calls:
$ cat addjs.sh
#!/bin/sh
SRC="$1"

grep -F -ne "\$config['additional_javascript'][]" -r "$SRC"/js > scripts.txt
grep -F -ne "\$config['additional_javascript'][]" "$SRC"/inc/instance-config.php > config.txt
python3 addjs.py scripts.txt config.txt

Sample invocation:
$ sh addjs.sh ~/Documents/leftypol_lainchan
js/forced-anon.js has js/style-select.js@12 js/options/general.js@13 but config has js/style-select.js@400 js/options/general.js@397
js/toggle-images.js has js/style-select.js@11 js/options/general.js@12 but config has js/style-select.js@400 js/options/general.js@397
js/no-animated-gif.js has js/style-select.js@10 js/options/general.js@11 but config has js/style-select.js@400 js/options/general.js@397
js/toggle-locked-threads.js has js/style-select.js@11 js/options/general.js@12 but config has js/style-select.js@400 js/options/general.js@397
js/options/general.js has js/style-select.js@9 js/options/general.js@10 but config has js/style-select.js@400 js/options/general.js@397
problems: 5

Currently, on the public sources, the only problem is style-select versus options/general, which is declared five times in the opposite order from $config['additional_javascript']. But this is the only declared >>34677 ordering problem. The style selector has been moved around recently, piggybacking on its sorted fix, but its placement in $config['additional_javascript'] and its attempted transfer at the end of options/general haven't been kept consistent. This can be fixed in either direction once the long-term placement of the style selector is decided.

the sample invocation without clownflare interference

Iqdb links but only for thumbnails supported by iqdb.org, so no webps and no full images.
Array.from (document.querySelectorAll ("div.files > div.file")).map (e => [e.querySelector ("img.post-image"), e.querySelector ("span.details")]).filter (([img, details]) => img.hasAttribute ("src") && /^\/[^\/]+\/thumb\/[^\/.]+[.](jpe?g|png|gif)$/i.test (img.getAttribute ("src"))).forEach (([img, details]) => {
  const span = document.createElement ("span")
  span.setAttribute ("class", "iqdb")
  span.innerHTML = ' <a href="https://iqdb.org/?url=https://leftypol.org' + img.getAttribute ("src") + '" target="_blank">iqdb</a>'
  details.appendChild (span)
})

>>34682
Why not full images? They seem to support them.

>>34683
>Why not full images? They seem to support them.
The first thing iqdb.org and friends do is shrink the image, so transferring full images is a waste of bandwidth on both ends when thumbnails are available. Unfortunately, not creating a retrievable thumbnail at all for spoilered images is a problem that goes all the way back to Tinyboard:
https://github.com/savetheinternet/Tinyboard/blob/master/post.php#L572
Using the full images when either a thumbnail is not available or is a webp will be in a future version of >>34682.

Upgrade of >>34682 to use the full images when either thumbnails are not available or in an unsupported format. A failed iqdb search will provide a saucenao link using a thumbnail generated by iqdb. This hasn't been tested with image hiders, expanders and similar scripts that mutate the div.file subtree.
((getthumb, getfull, getdest, getthumb2, getfull2, realthumb, formatok, speclist, showft) => Array.from (document.querySelectorAll ("div.files > div.file")).map (e => [getthumb (e), getfull (e), getdest (e)]).map (([ethumb, efull, edest]) => [ethumb ? getthumb2 (ethumb) : null, efull ? getfull2 (efull) : null, edest]).map (([thumb, full, edest]) => [thumb, full, edest, thumb && realthumb (thumb) && formatok (thumb), full && formatok (full)]).filter (([thumb, full, edest, thumbok, fullok]) => thumbok || fullok).forEach (([thumb, full, edest, thumbok, fullok]) => {
  const url  = "https://leftypol.org" + (thumbok ? thumb : full)
  const span = document.createElement ("span")
  span.setAttribute ("class", "iqdb")
  span.innerHTML = ' ' + (showft ? ((thumbok ? 'T' : 'F') + ':') : "") + speclist.map (([label, urlfun]) => '<a href="' + urlfun (url) + '" target="_blank">' + label + '</a>').join (' ')
  edest.appendChild (span)
})) (
  e => e.querySelector ("img.post-image"),
  e => e.querySelector ('p.fileinfo a[target="_blank"][href*="/src/"]'),
  e => e.querySelector ("span.details"),
  e => e.getAttribute ("src"),
  e => e.getAttribute ("href"),
  s => /^\/[^\/]+\/thumb\//.test (s),
  s => /[.](jpe?g|png|gif)$/i.test (s),
  [
    ["iqdb", s => "https://iqdb.org/?url=" + s],
 // ["nao",  s => "https://saucenao.com/search.php?db=999&dbmaski=32768&url=" + s]
  ],
  false
)

Multiupload with the site's scripts disabled but JS enabled in the dev tools console:
(count => {
  const dest = document.querySelector ("tr#upload > td.upload-area")
  if (dest == null) { return; }
  const have = dest.querySelectorAll ('input[type="file"]').length
  if (have >= count) { return; }
  const make = n => '<br class="file_separator"/><input type="file" name="file' + n + '" id="upload_file' + n + '">'
  const add  = []
  for (let k = 2; k <= count; k++) {
    add.push (make (k))
  }
  dest.innerHTML += add.join ("")
}) (5)

test: >>>/meta/10945

Some harmless fun with the original filenames. If the filename looks like a timestamp from a board download >>34492 the UTC date is provided. If it looks like an md5 hash >>34524 an md5 search link is provided to r34. Other matchers might be added later. This is merely a demo, not anything serious.
((getfilesbody, getorig, decorate, providers) => getfilesbody ().forEach (([files, body]) => {
  const infolist = Array.from (files.querySelectorAll ("div.file")).map ((f, index) => [getorig (f), index + 1]).filter (p => p [0] != null).map (([name, index]) => providers.map (p => p (name, index)).filter (s => s != null)).flat (1)
  if (infolist.length > 0) {
    decorate (body, infolist)
  }
})) (
  () => Array.from (document.querySelectorAll ("div.thread > div.files")).map (f => [f, f.parentNode.querySelector ("div.post.op > div.body")]).concat (Array.from (document.querySelectorAll ("div.post.reply")).map (r => [r.querySelector ("div.files"), r.querySelector ("div.body")]).filter (p => p [0] != null)),
  f => {
    const a = f.querySelector ('span.details > a[download][title^="Save as original filename"]')
    return a == null ? null : a.getAttribute ("download")
  },
  (body, infolist) => {
    const p = document.createElement ("p")
    p.setAttribute ("class", "miscfilesbodyinfo")
    p.innerHTML = infolist.join ("<br/>")
    if (body.firstChild) {
       body.insertBefore (p, body.firstChild)
       const hr = document.createElement ("hr")
       hr.setAttribute ("style", "clear: none;")
       body.insertBefore (hr, p.nextSibling)
    } else {
       body.appendChild (p)
    }
  },
  [
 // (name, index) => "file " + index + " name " + name,
    (name, index) => {
      const m = name.match (/^([0-9a-fA-F]{32})[.]/)
      if (m == null) { return null; }
      const hash = m [1]
      return "file " + index + " md5 " + hash + ' search <a href="https://rule34.xxx/index.php?page=post&s=list&tags=md5%3a' + hash + '" target="_blank">r34</a>'
    },
    (name, index) => {
      const m = name.match (/^([0-9]{13})[.]/)
      if (m == null) { return null; }
      const time = parseInt (m [1], 10)
      return "file " + index + " timestamp " + time + " date " + new Date (time).toUTCString ()
    }
  ]
)

Let me get rid of this, I keep clicking it instead of the reply button

>>34688
Include enough context around it to show which one you mean.

File: 1630662239183.png (140.99 KB, 1086x450, ClipboardImage.png)

>>34689
Oh also I had another niche feature idea that I think would actually be used quite a bit but sounds silly. A "greentext/quote all text" button so you can copy and paste an article without having to manually add > to every line and inevitably miss a break in the middle of a paragraph due to the site it being copied from having weird formatting.

>>34690
If you want that button gone right now without waiting for anything fancy you can go to Options → User CSS and enter:
div.post.op > p.intro > a.watchThread { display: none; }

Adding a button to quote every line in the comment field can be done from User JS, I'll post that tomorrow. Recovering missing line breaks from another site can only be done after you specify precise and complete rules for doing so.

>>34691
>Recovering missing line breaks from another site can only be done after you specify precise and complete rules for doing so.
No I mean it will avoid quoting text like

>Oh also I had another niche feature idea that I think would actually

be used quite a bit but sounds silly.
>A "greentext/quote all text" button so you can copy and paste an article without
having to manually add > to every line and inevitably miss a break in the middle of a paragraph due to the site it being copied from having weird formatting.

Because line breaks aren't always visible when adding the quotes manually, it will just keep it all green
>div.post.op > p.intro > a.watchThread { display: none; }
Based, thanks

>>34692
Here's some Options → User JS code to add a quote link to the post forms that quotes the lines of the comment field. To change the link's text modify the value of the a.innerText assignment. Empty lines and lines that look like post links are exempt from quoting. To modify the exemptions adjust the untouched function.
(() => {
  const empty     = s => /^\s*$/.test (s)
  const untouched = s => /^\s*>>(\d+|>\/\w+\/\d*)\s*$/.test (s)
  const prefix    = "> "
  const oneline   = s => (empty (s) || untouched (s)) ? s : (prefix + s)
  const edit      = s => s.split ("\n").map (oneline).join ("\n")
  const perform   = area => {
    const vold = area.value
    const vnew = edit (vold)
    if (vold != vnew) {
      area.focus ()
      area.setRangeText (vnew, 0, vold.length, "end")
    }
  }
  const install   = form => {
    const dest = form.querySelector ("div.banner")
    const have = dest.querySelector ("a.quotecommentlines")
    const area = form.querySelector ('textarea[name="body"]')
    if (have == null) {
      const a = document.createElement ("a")
      a.setAttribute ("class", "quotecommentlines")
      a.setAttribute ("href",  "javascript:void(0)")
      a.setAttribute ("title", "quote comment lines")
      a.innerText = "> "
      a.addEventListener ('click', event => {
        perform (area)
      })
      dest.insertBefore (a, dest.firstChild)
    } else if (form.getAttribute ("id") == "quick-reply") {
      have.addEventListener ('click', event => {
        perform (area)
      })
    }
  }
  const setup     = () => {
    const form    = document.querySelector ('form[name="post"]')
    if (form == null) { return; }
    install (form)
    const doquick = () => {
      const q = document.querySelector ('form#quick-reply')
      if (q != null) { install (q); }
    }
    doquick ()
    $(window).on ('quick-reply', doquick)
  }

  setup ()
}) ()

There's no div.banner in the post form in index pages so >>34693 only works in thread pages. Here's the fix to the install function to make it work in both thread pages and index pages.
(() => {
  const empty     = s => /^\s*$/.test (s)
  const untouched = s => /^\s*>>(\d+|>\/\w+\/\d*)\s*$/.test (s)
  const prefix    = "> "
  const oneline   = s => (empty (s) || untouched (s)) ? s : (prefix + s)
  const edit      = s => s.split ("\n").map (oneline).join ("\n")
  const perform   = area => {
    const vold = area.value
    const vnew = edit (vold)
    if (vold != vnew) {
      area.focus ()
      area.setRangeText (vnew, 0, vold.length, "end")
    }
  }
  const install   = form => {
    const area   = form.querySelector ('textarea[name="body"]')
    const listen = e => {
      e.addEventListener ('click', event => {
        perform (area)
      })
    }
    const quick  = form.getAttribute ("id") == "quick-reply"
    const build  = () => {
      const a = document.createElement ("a")
      a.setAttribute ("class", "quotecommentlines")
      a.setAttribute ("href",  "javascript:void(0)")
      a.setAttribute ("title", "quote comment lines")
      a.innerText = "> "
      return a
    }
    const have   = form.querySelector ("a.quotecommentlines")
    const insert = e => {
      if (quick) {
        const dest = form.querySelector ("div.banner")
        if (dest == null) { return; }
        dest.insertBefore (e, dest.firstChild)
      } else {
        const dest = area.parentNode.previousSibling
        if (dest == null) { return; }
        dest.insertBefore (document.createElement ("br"), dest.firstChild)
        dest.insertBefore (e, dest.firstChild)
      }
    }

    if (have == null) {
      const e = build ()
      insert (e)
      listen (e)
    } else if (quick) {
      insert (have)
      listen (have)
    }
  }
  const setup     = () => {
    const form    = document.querySelector ('form[name="post"]')
    if (form == null) { return; }
    install (form)
    const doquick = () => {
      const q = document.querySelector ('form#quick-reply')
      if (q != null) { install (q); }
    }
    doquick ()
    $(window).on ('quick-reply', doquick)
  }

  setup ()
}) ()

File: 1630855709885.png (3.05 KB, 449x67, ClipboardImage.png)

m8 who tf extended the already annoying as fuck FLOOD DETECTED box to two minutes? Can we have something slightly more sophisticated like kicking in on the third post so I don't have to sit like a retard pressing New Reply to correct a mistake in the previous post?

Upgrade of >>34687 to unify handling of the two sites. It'll work on some other vichan-based boards as well if their URLs are added.
(regexlisttest => ((sitespec, providers) => {
  const site = sitespec.find (spec => spec ["test"] ())
  if (!site) { return; }
  const postfiles = site ["postfiles"]
  const original  = site ["original" ]
  const decorate  = site ["decorate" ]
  site ["filesbody"] ().forEach (([files, body]) => {
    const infolist = postfiles (files).map ((f, index) => [original (f), index + 1]).filter (p => p [0] != null).map (([name, index]) => providers.map (p => p (name, index)).filter (s => s != null)).flat (1)
    if (infolist.length > 0) {
      decorate (body, infolist)
    }
  })
}) (
  [
    {
      test:      regexlisttest ([
     // /^https?:\/\//,
        /^https?:\/\/leftychan\.net\//,
        /^https?:\/\/leftypol\.org\//,
      ]),
      filesbody: () => Array.from (document.querySelectorAll ("div.thread > div.files")).map (f => [f, f.parentNode.querySelector ("div.post.op > div.body")]).concat (Array.from (document.querySelectorAll ("div.post.reply")).map (r => [r.querySelector ("div.files"), r.querySelector ("div.body")]).filter (p => p [0] != null)),
      postfiles: files => Array.from (files.querySelectorAll ("div.file")),
      original:  f => {
        let e = f.querySelector ('span.postfilename')
        if (e != null) { return e.hasAttribute ("title") ? e.getAttribute ("title") : e.innerText; }
        e = f.querySelector ('span.details > a[download][title*="original filename"]')
        if (e != null) { return e.getAttribute ("download"); }
        return null
      },
      decorate:  (body, infolist) => {
        const p = document.createElement ("p")
        p.setAttribute ("class", "miscfilesbodyinfo")
        p.innerHTML = infolist.join ("<br/>")
        if (body.firstChild) {
          body.insertBefore (p, body.firstChild)
          const hr = document.createElement ("hr")
          hr.setAttribute ("style", "clear: none;")
          body.insertBefore (hr, p.nextSibling)
        } else {
          body.appendChild (p)
        }
      }
    }
  ], [
 // (name, index) => "file " + index + " name " + name,
    ((link, speclist) => (name, index) => {
      const m = name.match (/^([0-9a-fA-F]{32})[.]/)
      if (m == null) { return null; }
      const hash = m [1]
      return "file " + index + " md5 " + hash + ' search ' + speclist.map (e => link (e ["href"] (hash), e ["name"])).join (" ")
    }) (
      (h, t) => '<a href="' + h + '" target="_blank">' + t + '</a>',
      [
        {
          name: "r3",
          href: s => "https://rule34.xxx/index.php?page=post&s=list&tags=md5%3a" + s,
        }
      ]
    ),
    (name, index) => {
      const m = name.match (/^([0-9]{13})[-.]/)
      if (m == null) { return null; }
      const time = parseInt (m [1], 10)
      return "file " + index + " timestamp " + time + " date " + new Date (time).toUTCString ()
    }
  ]
)) (
  regexlist => () => (url => regexlist.some (rx => rx.test (url))) (document.location.href)
)

>>34695
Two minutes? Which board is this? It shouldn't ever be that high unless you're on a shared IP during high traffic (such as the Tor node) or making new threads (different message).
I can look into making a more lenient filter, we're currently just using the default basic one.

>>34697
Lainchan was a mistake.

Turns out the long-tern post filtering bug (cannot hide/filter individual posts in threads) was due to them adding a postcontainer div, apparently just so that they could add '>>' to the left of each reply. Since they don't use bloat many of the additional Javascripts, they didn't realize it broke some.

As a side affect, I believe reverting that change fixed the issue where short posts are occasionally stacked to the right instead of below.

Filters appear to work fine now which opens up a lot of opportunities. Shout out if anything seems to have broken.

>>34697
/leftypol/, non-shared private IP. The time between the two posts was 2 minutes when it finally allowed me to post. Sometimes it feels like pressing it resets the count.

>>34698
>adding a postcontainer div
The alternative solution with keeping postcontainer is in >>>/leftypol_archive/1822 2021-01-29.

>>34700
I'm happy to implement either solution, which do you think is better? It looked to me as if the postcontainer didn't offer anything and broke scripts.

>>34701
>which do you think is better?
I have no opinion to offer on the costs/benefits of keeping versus removing div.postcontainer, so I trust your judgement that "the postcontainer didn't offer anything and broke scripts" and should therefore be removed. Regardless of the fate of postcontainer I also recommend the change >>>/leftypol_archive/1822 from .parent() to .parents('.thread') simply because it makes the id retrieval more resilient by causing it to work both in the presence and absence of postcontainer.

Upgrade of >>34696 to add support for lynx-based boards.
((regexlisttest, prefixhr) => ((sitespec, providers) => {
  const site = sitespec.find (spec => spec ["test"] ())
  if (!site) { return; }
  const postfiles = site ["postfiles"]
  const original  = site ["original" ]
  const decorate  = site ["decorate" ]
  site ["filesbody"] ().forEach (([files, body]) => {
    const infolist = postfiles (files).map ((f, index) => [original (f), index + 1]).filter (p => p [0] != null).map (([name, index]) => providers.map (p => p (name, index)).filter (s => s != null)).flat (1)
    if (infolist.length > 0) {
      decorate (body, infolist)
    }
  })
}) (
  [
    {
      test:      regexlisttest ([
        /^https?:\/\/someoldchan\.live\//,
      ]),
      filesbody: () => Array.from (document.querySelectorAll ("div.innerOP, div.innerPost")).map (i => [i.querySelector ("div.panelUploads"), i.querySelector ("div.divMessage")]).filter (p => p [0] != null),
      postfiles: files => Array.from (files.querySelectorAll ("figure.uploadCell")),
      original:  f => {
        const e = f.querySelector ('a.originalNameLink[download]')
        return e == null ? null : e.getAttribute ("download")
      },
      decorate:  prefixhr ({join: '<br style="display: initial;"/>'})
    }, {
      test:      regexlisttest ([
     // /^https?:\/\//,
        /^https?:\/\/leftychan\.net\//,
        /^https?:\/\/leftypol\.org\//,
      ]),
      filesbody: () => Array.from (document.querySelectorAll ("div.thread > div.files")).map (f => [f, f.parentNode.querySelector ("div.post.op > div.body")]).concat (Array.from (document.querySelectorAll ("div.post.reply")).map (r => [r.querySelector ("div.files"), r.querySelector ("div.body")]).filter (p => p [0] != null)),
      postfiles: files => Array.from (files.querySelectorAll ("div.file")),
      original:  f => {
        let e = f.querySelector ('span.postfilename')
        if (e != null) { return e.hasAttribute ("title") ? e.getAttribute ("title") : e.innerText; }
        e = f.querySelector ('span.details > a[download][title*="original filename"]')
        if (e != null) { return e.getAttribute ("download"); }
        return null
      },
      decorate:  prefixhr ({join: "<br/>"})
    }
  ], [
 // (name, index) => "file " + index + " name " + name,
    ((link, speclist) => (name, index) => {
      const m = name.match (/^([0-9a-fA-F]{32})[.]/)
      if (m == null) { return null; }
      const hash = m [1]
      return "file " + index + " md5 " + hash + ' search ' + speclist.map (e => link (e ["href"] (hash), e ["name"])).join (" ")
    }) (
      (h, t) => '<a href="' + h + '" target="_blank">' + t + '</a>',
      [
        {
          name: "r3",
          href: s => "https://rule34.xxx/index.php?page=post&s=list&tags=md5%3a" + s,
        }
      ]
    ),
    (name, index) => {
      const m = name.match (/^([0-9]{13})[-.]/)
      if (m == null) { return null; }
      const time = parseInt (m [1], 10)
      return "file " + index + " timestamp " + time + " date " + new Date (time).toUTCString ()
    }
  ]
)) (
  regexlist => () => (url => regexlist.some (rx => rx.test (url))) (document.location.href),
  config => (body, infolist) => {
    const p = document.createElement ("p")
    p.setAttribute ("class", "miscfilesbodyinfo")
    p.innerHTML = infolist.join (config ["join"])
    if (body.firstChild) {
      body.insertBefore (p, body.firstChild)
      const hr = document.createElement ("hr")
      hr.setAttribute ("style", "clear: none;")
      body.insertBefore (hr, p.nextSibling)
    } else {
      body.appendChild (p)
    }
  }
)

File: 1631011636594.png (232.27 KB, 707x615, ClipboardImage.png)

Why did the date format on the posts change from a beautiful ISO8601 to a horrible and confusing burger date format?

>>34704
Are those posts still like that? Can you link them?
All the posts look like ISO8601 to me. The one I'm replying to is fine.

>>34705
Sorry it's just 4chanX messing up with the format.

Okay lads I have a feature suggestion I have never seen on any imageboard, I am quite pleased to say it is a genius idea and quite simple.
In the reply box, when you start a line with > or <, it will greentext or orangetext the line as it would appear in the reply.

>>34707
>In the reply box
Textarea is a plain text element without subrange styling.
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea
The comment line quoter which avoids >>34692 is in >>34694.

i might be the only affected person but i can't upload images via tor browser on android

File: 1632148454808.png (83.52 KB, 972x609, ClipboardImage.png)

There's now a dark solarized theme.

>>34709
It's not just you, I usually don't post images via mobile but I tried and they wouldn't attach (both with and without JS). I'm not sure how it would be fixed.

YouTube now blocks every Tor exit node. Can you change the URLs of YouTube videos so instead of YouTube links, it gives you Invidious links like this? That way we can all watch easily.

https://iteroni.com/watch?v=r65hqtFSoBY

>>34711
that makes two of us

>>34712
i type in watch?v= all the time. making it automatic would probably require an add-on? which is unadvisable with tor borwser

The best part about leftychan is that they reverted your shitty fucking webp thumbnail bullshit and suddenly the site became 10x more usable again because I can actually see post thumbnails on a fucking image board. Do the same here and maybe I'll think about posting again. The mods have otherwise done next to nothing constructive to end the split.

>>34712
Array.from (document.querySelectorAll ('a[href^="https://youtu.be/"]')).map (e => [e, e.getAttribute ("href").match (/^https:\/\/youtu\.be\/(watch\?v=)?([^?\/]+)$/)]).filter (p => p [1] != null).forEach (([e, m]) => { e.setAttribute ("href", "https://iteroni.com/watch?v=" + m [2]); })


>>34714
Array.from (document.querySelectorAll ('a[href^="https://youtu.be/"]')).map (e => [e, e.getAttribute ("href").match (/^https:\/\/youtu\.be\/([^?\/]+)$/)]).filter (p => p [1] != null).forEach (([e, m]) => { e.setAttribute ("href", "https://youtu.be/watch?v=" + m [1]); })


>>34711
If you can upload on other sites with the same procedure look at a var_dump of $_FILES early in post.php:handle_post.

>>34712
How about having a separate button for embedding with a mirror?
Eg:
[Embed] [Mirror]
?
Ive had issues with some invidious instances. How can we choose a reliable one?

>>34717
That would be cool, They could probably allow us to enter a custom instance in the options menu, so long as the default is a sane choice that proxies.

>>34715
If your computer can't show .webp in a browser by now, I think you should look into fixing it.

>>34718
Do you know of a good proxy?

File: 1632225263176.png (358.88 KB, 950x681, ClipboardImage.png)

>>34719
I never really looked into it properly, but I have confirmed https://incogtube.com proxies the videos instead of direct linking, and they also have Tor, I2P and Yggdrasil services.
aka. http://tuberyps2pn6dor6h47brof3w2asmauahhk4ei42krugybzzzo55klad.onion/feed/trending


>>34720
>….onion
This works well. Ok, I'll put it in the backlog.

Maybe if you're on tor, it embeds the .onion, if you're on clearnet, it embeds the clearnet site. That makes the most sense, right? Or is clearnet preferred for both situations?

>>34717
>Ive had issues with some invidious instances. How can we choose a reliable one?
How about the [Mirror] button links to https://redirect.invidious.io/watch?v={youtube_video_id}?

>>34722
It's not just Tor users that want to use invidious instead of YouTube, so I'd rather link both Youtube and an invidious instance on clearnet as well.

Here's a radical idea though: how about we embed an invidious instance by default and provide the original Youtube link as secondary? Like this: [Embed] [YouTube]


>>34722
If it's not difficult, Tor->Tor makes sense.

>>34724
I support this.

>>34713
>>34709
Can you find any websites where Tor android upload does work? I tried on a generic upload site and it failed the same way.

> https://git.leftypol.org/leftypol/leftypol/commit/1e690333a8b91e852fa81d2e5f458d64050c3e53
> Remove instance configuration
Removing instance-config.php from git will make issues harder to diagnose.

>>34728
Yeah but maybe the `salt' and `secure_trip_salt' shouldn't be public lmao

>>34729
> https://git.leftypol.org/leftypol/leftypol/commit/1e690333a8b91e852fa81d2e5f458d64050c3e53
> $config['db']['password'] = '';
Perhaps you could replace sensitive strings with the empty string, as is already done with $config['db']['password'], and restore the rest of instance-config.php, which is a great help in debugging.

>>34730
(NTA) I guess the issue is:
- adding the instance-config so that it has convenient version control
- preventing sensitive information from being added
I wonder if using an 'include' at the bottom of the instance-config to store sensitive values in another config file is an appropriate solution.

>>34731
Whatever system is already in use for wiping $config['db']['password'] can be used for the salts.

Sorry for the unreasonable delays on many of these old issues. Hopefully we can get through them quicker now that we have more active devs with code access and a stable set-up.

File-thumbing on catalogs should now be fixed. Tested it on file uploads and deleting the first image of two in an OP.
Catalog posting without javascript now works, added an inline "list-style: none" to remove the drop-down triangle.
Fixed a few of the themes and added Midnight from >>>/leftypol_archive/1541

Let us know about any outstanding issues that aren't in the Gitea tracker.

>>34730
>>34732
I doubt they replace the password. It is much more likely that they don't actually use one.

>>34734 >>34729
>I doubt they replace the password. It is much more likely that they don't actually use one.
I have no way of knowing that, but we know a password was formerly in use:
> https://git.leftypol.org/leftypol/leftypol/commit/80dc724738310b5c86ff43a7b3c6977ccd74e965
> lots of print statements
> - $config['db']['password'] = 'oijrljqqwjr242kjn';
> + $config['db']['password'] = '';

Here's a generator for >>34729 an instance-config-nosecrets.php:
$ cat instance-config-nosecrets.sh
#!/bin/sh
set -e

keylist ()
{
   #  in: cookies salt
   # out: \['cookies'\]\['salt'\]
   echo "$1" | sed -r -e 's/([^ ]+)( +|$)/\\['"'"'\1'"'"'\\]/g'
}

wipeone ()
{
   #  in: cookies salt
   # out: s/^(\$config\['cookies'\]\['salt'\] *= *')[^']+('.+)$/\1\2/
   env echo 's/^(\$config'"$(keylist "$1") *= *')[^']+('.+)\$/\1\2/"
}

nosecrets ()
{
   sed -r \
       -e "$(wipeone 'cookies salt')" \
       -e "$(wipeone secure_trip_salt)" \
       "$1" > "$2"
}

main ()
{
   nosecrets inc/instance-config.php inc/instance-config-nosecrets.php
}

main

It can be rerun whenever instance-config.php is modified, and instance-config-nosecrets.php can be put into git. To verify:
$ diff inc/instance-config.php inc/instance-config-nosecrets.php

>>34733
>File-thumbing on catalogs should now be fixed. Tested it on file uploads and deleting the first image of two in an OP.
>Catalog posting without javascript now works, added an inline "list-style: none" to remove the drop-down triangle.
👍

>Let us know about any outstanding issues that aren't in the Gitea tracker.

I'll make a list, but it takes a bit.

File: 1633098081688.txt (4.85 KB, userjs.txt)

Trimmed Options → User JS >>34663 for the new backend fixes.
① catalog links in div.boardlist >>34604
② thread stats and Unique IPs >>34497
③ batch loop/once WebM setting >>34519
④ top/bottom navlinks in the top bar >>34522
⑤ catalog link above OP >>34544
⑥ quick reply spoiler sync >>34661
⑦ quick reply before init_file_selector >>34662

File: 1633120548099.jpg (797.3 KB, 720x1080, 1630180285468.jpg)

> outstanding issues that aren't in the Gitea tracker >>34733
+ Unique IPs on the right | requested by >>>/leftypol_archive/1601 >>>/leftypol_archive/1624 >>>/leftypol_archive/1756 | fix >>34497
+ batch loop/once WebM setting | requested by >>>/leftypol_archive/1521 | frontend-only hack >>34519
+ update of old #229 sticky catalog for the new overboards | fix >>34605
+ catalog links in boardlist; as phrased #22 is distinct | requested by >>>/leftypol_archive/1449 | fix >>>/leftypol_archive/1807
+ up/down buttons floating | requested by >>>/leftypol_archive/1832 | frontend-only hack >>34522
+ per-file spoiler | requested by >>34570 | see this thread on the other site #10799 #10800
+ leftover memory leaks from quick-reply sync >>34655 >>34657 >>34658 >>34660
+ restore instance-config.php to git without salts >>34729 >>34735

>>34738
Thank you very much for this.
Also, we might revert the deferring code, at least for things like the file-selector.js where it should be loaded timely to avoid complication.

>>34739
>we might revert the deferring code, at least for things like the file-selector.js where it should be loaded timely to avoid complication
That's for you to decide. On the same theme: >>34641 >>34642 >>34651 >>34652 >>34654.

File: 1633176083089.png (25.16 KB, 625x205, ClipboardImage.png)

please add .jfif as an acceptable file extension

>>34741
and djvu

A backend version of >>34522 >>34738.

The thread view's top/bottom targets are #top and #bottom:
https://git.leftypol.org/leftypol/leftypol/src/commit/2d16e747a18ba900ec220a4303249402c19dcd37/templates/thread.html#L61
> <span class="threadlink"><a href="#bottom" style="padding-left: 10px"> {% trans %}Go to bottom{% endtrans %}</a> ]</span>
https://git.leftypol.org/leftypol/leftypol/src/commit/2d16e747a18ba900ec220a4303249402c19dcd37/templates/thread.html#L73
> <a id="thread-top" href="#top">[{% trans %}Go to top{% endtrans %}]</a>

The corresponding anchors are placed just after the boardlist and just before the end of the body:
https://git.leftypol.org/leftypol/leftypol/src/commit/2d16e747a18ba900ec220a4303249402c19dcd37/templates/thread.html#L32
> <a name="top"></a>
https://git.leftypol.org/leftypol/leftypol/src/commit/2d16e747a18ba900ec220a4303249402c19dcd37/templates/thread.html#L116
> <a href="#" id="bottom"></a>

The boardlist assembly:
https://git.leftypol.org/leftypol/leftypol/src/commit/2d16e747a18ba900ec220a4303249402c19dcd37/inc/display.php#L80
> 'top' => '<div class="boardlist">' . $body . '</div>' . $top,
This could host a span with two links with titles, some classes and some default styling such as floating in style.css. Inclusion could be controlled by a new optional boolean passed to createBoardlist that defaults to false.
// after trim
if ($topbottomlinks) {
    $body .= ' <span class="topbottomlinks"><a href="#top" title="' . _('Go to top') . '">&#x25B2;</a> <a href="#bottom" title="' . _('Go to bottom') . '">&#x25BC;</a></span>';
}

// in style.css
.topbottomlinks {
    ... style to taste ...
}
.topbottomlinks a {
    ... style to taste ...
}


The createBoardlist invocations that would need the new boolean set to true:
https://git.leftypol.org/leftypol/leftypol/src/commit/2d16e747a18ba900ec220a4303249402c19dcd37/inc/functions.php#L1405
https://git.leftypol.org/leftypol/leftypol/src/commit/2d16e747a18ba900ec220a4303249402c19dcd37/inc/functions.php#L2331
https://git.leftypol.org/leftypol/leftypol/src/commit/2d16e747a18ba900ec220a4303249402c19dcd37/inc/functions.php#L2434
https://git.leftypol.org/leftypol/leftypol/src/commit/2d16e747a18ba900ec220a4303249402c19dcd37/templates/themes/catalog/theme.php#L486
https://git.leftypol.org/leftypol/leftypol/src/commit/2d16e747a18ba900ec220a4303249402c19dcd37/templates/themes/overboards/theme.php#L216

Plenty of views have boardlists, most of them lacking top/bottom anchors:
$ grep -e '{{ *boardlist\.top *}}' -r .
Out of those the ones that matter and need top/bottom anchors are:
templates/index.html
templates/themes/catalog/catalog.html

The unicode arrows used above:
▲=&#x25B2;
▼=&#x25BC;

File: 1633218508777.png (33.66 KB, 447x420, 1630800257046.png)

Since the sources can now be referenced, here are the per-file spoiler >>34738 posts.


To move towards per-file spoilers >>34570 >>34573 exemptions for spoiler1 through spoiler9 should be added to $config['spam']['valid_inputs'], to allow per-file booleans to pass through the post form. Their number is simply for consistency with the existing file_url9.
https://git.leftypol.org/leftypol/leftypol/src/commit/2d16e747a18ba900ec220a4303249402c19dcd37/inc/config.php#L279

The names of the file fields of the post form are file, file2, file3 and so on.
https://git.leftypol.org/leftypol/leftypol/src/commit/2d16e747a18ba900ec220a4303249402c19dcd37/js/file-selector.js#L73

Those names can be used to select corresponding booleans sent by checkboxes, and are available as $_FILES keys when processing uploads. The $key can be temporarily stored in $file, for example as $file['formparametername'].
https://git.leftypol.org/leftypol/leftypol/src/commit/2d16e747a18ba900ec220a4303249402c19dcd37/post.php#L793
https://www.php.net/manual/en/features.file-upload.post-method.php

The spoiler test
https://git.leftypol.org/leftypol/leftypol/src/commit/2d16e747a18ba900ec220a4303249402c19dcd37/post.php#L1064
can then be modified to check per-file booleans:
< if ($config['spoiler_images'] && isset($_POST[str_replace('file', 'spoiler', $file['formparametername'])])) {


For per-file spoilers for the non-JS case the way to have multiple file controls can be found in multi-image.js:
https://git.leftypol.org/leftypol/leftypol/src/commit/2d16e747a18ba900ec220a4303249402c19dcd37/js/multi-image.js#L21
> var new_file = '<br class="file_separator"/><input type="file" name="file'+(images_len+1)+'" id="upload_file'+(images_len+1)+'">';

The original spoiler checkbox is in post_form.html:
https://git.leftypol.org/leftypol/leftypol/src/commit/2d16e747a18ba900ec220a4303249402c19dcd37/templates/post_form.html#L51
> {% if config.spoiler_images %}<div id="spoilercontainer"> <input id="spoiler" name="spoiler" type="checkbox"> <label for="spoiler">{% trans %}Spoiler Image{% endtrans %}</label></div>{% endif %}

as is the file input:
https://git.leftypol.org/leftypol/leftypol/src/commit/2d16e747a18ba900ec220a4303249402c19dcd37/templates/post_form.html#L149
> <input type="file" name="file" id="upload_file">

The div#spoilercontainer can be dropped and the file input replaced with:
{% for counter in 1..config.max_images %}
    {% if counter > 1 %}<br class="file_separator"/>{% endif %}
    {% set countersuffix = counter == 1 ? '' : counter %}
    {% if config.spoiler_images %}<span class="spoilercontainer"><input id="spoiler{{ countersuffix }}" name="spoiler{{ countersuffix }}" type="checkbox"><label for="spoiler{{ countersuffix }}">S{{ counter }}</label></span>{% endif %}
    <input type="file" name="file{{ countersuffix }}" id="upload_file{{ countersuffix }}">
{% endfor %}


A sample result is attached. This will enable per-file spoilers for the non-JS case. I'll leave the necessary frontend changes for the JS case to those who regularly browse with remote code execution enabled.

>>34712
>YouTube now blocks every Tor exit node.
When you browse via tor, embeds now use an invidious hidden service by default.
In an ideal world, the embed would choose a random proxy from a list of good proxies >>34558 (https://github.com/iv-org/documentation/blob/master/Invidious-Instances.md ).

My wish is something that helps with twitter links to automatically link to a random nitter instance. I absolutely detest the twitter front end. So much so that I avoid clicking twitter links.

Maybe it could look like this:
www.twitter.com/something/something [nitter]
Where [nitter] is a button that takes you to the same link, but on nitter.

>>34741
>>34742
Done. Please test and report.

https://git.leftypol.org/leftypol/leftypol/commit/af8b645b2395cf0d3ac0e6202d2fe1793f74e140
> Adds bar | to unique IP counter
If you want a vertical bar but place it there, you'll get a dangling bar on the right in the non-JS case. By contrast, if you want a vertical bar but place it on the left in
https://git.leftypol.org/leftypol/leftypol/src/commit/2a506d8dec5b9cb10686c8509ec73f112069bd07/js/thread-stats.js#L25
you'll get essentially the same effect but without dangling bars.

File: 1633862319695.jpg (253.81 KB, 566x800, aqua thumbs up.jpg)

>>34745
>Done. Please test and report.
djvu works

File: 1633954114029.png (126.28 KB, 1059x719, lpimage.png)

Here's a graph of relative PPD for the last 30 days for thread views.
((pagetest, install, getdata, draw) => {
  const back   = 'rgba(  0,   0,  60, 1)'
  const bars   = 'rgba(  0,   0, 255, 1)'
  const grid   = 'rgba(128, 128, 128, 1)'
  const count  = 30, step = 15
  const width  = count * step
  const height = 100

  if (!pagetest ()) { return; }
  context = install ({
    width:  width,
    height: height,
  })
  if (!context.ok) { return; }

  context.back   = back
  context.bars   = bars
  context.grid   = grid
  context.count  = count
  context.step   = step
  context.width  = width
  context.height = height
  context.data   = getdata (count)
  draw (context)
}) (
  () => (document.getElementById ('uniqueip') != null) && (document.querySelectorAll ('div.post.op').length == 1),
  config => {
    const holder = document.createElement ("div")
    holder.innerHTML = '<div style="text-align: center;"><canvas id="canvasid" width="' + config.width + '" height="' + config.height + '" style="border: 1px solid; z-index: 100; position: relative;">canvas</canvas></div>'
    const target = document.getElementById ('thread-interactions')
    if (target == null) { return { ok: false }; }
    target.parentNode.insertBefore (holder, target)
    const canvas = document.getElementById ('canvasid')

    if (canvas.getContext) {
      const ctx = canvas.getContext ('2d')
      return {
        ok:      true,
        holder:  holder,
        canvas:  canvas,
        context: ctx,
      }
    } else {
      holder.remove ()
      return { ok: false }
    }
  },
  count => {
    const all = Array.from (document.querySelectorAll ('p.intro time')).map (e => e.innerText.match (/^\d{4}-\d{2}-\d{2}/)).filter (m => m != null).reduce ((acc, m) => {
      const key = m [0]
      if (key in acc) {
        acc [key] += 1
      } else {
        acc [key]  = 1
      }
      return acc
    }, {})
    const now = new Date ()
    const key = k => {
      const when = new Date (now)
      when.setUTCDate (now.getUTCDate () - k)
      return when.getUTCFullYear ().toString ().padStart (4, '0') + '-' + (when.getUTCMonth () + 1).toString ().padStart (2, '0') + '-' + when.getUTCDate ().toString ().padStart (2, '0')
    }
    const ret = Array.from ({length: count}, (x, k) => all [key (k)] ?? 0)
    return ret
  },
  context => {
    const ctx   = context.context
    const data  = context.data
    const max   = data.reduce ((a, b) => Math.max (a, b), 0) || 1
    const w     = context.width
    const h     = context.height
    const count = context.count
    const step  = context.step

    ctx.fillStyle = context.back
    ctx.fillRect (0, 0, w, h)

    ctx.strokeStyle = context.grid
    for (let k = 0; k < count; k++) {
      ctx.beginPath ()
      ctx.moveTo (step * k, 0)
      ctx.lineTo (step * k, h)
      ctx.stroke ()
    }

    ctx.fillStyle = context.bars
    for (let k = 0; k < count; k++) {
      const y = data [k] * h / max
      ctx.fillRect (w - step - k * step, h - y, step, y)
    }
  }
)

Just a demo.

Would it be possible to hide threads from the catalog?

>>34749
It should be. Threads hidden in the normal index page view are hidden in the catalog.

File: 1634121334334.png (244.59 KB, 3177x800, lpimage.png)

Here's a plot for catalog views that shows the relative age of threads, growing to the right, the relative reply counts, growing to the top, and the relative bump freshness, active in red, dormant in blue. The sample images are for /tech/, /leftypol/ and /siberia/.
(tools => ((install, sitespec) => {
  const site   = sitespec.find (spec => spec.pagetest ())
  if (!site) { return; }
  const config = site.getconfig ()
  if (!config.ok) { return; }
  install (config)
  if (!config.ok) { return; }
  site.getdata (config)
  if (!config.ok) {
    config.holder.remove ()
    return
  }
  site.draw (config)
}) (
  config => {
    // > width height insertmode inserttarget
    // < holder canvas context
    const modes = {
      after:  (holder, target) => { target.parentNode.insertBefore (holder, target.nextSibling); },
      before: (holder, target) => { target.parentNode.insertBefore (holder, target); },
      first:  (holder, target) => { target.insertBefore (holder, target.firstChild); },
      last:   (holder, target) => { target.appendChild (holder); },
    }

    const holder = document.createElement ("div")
    holder.innerHTML = '<div style="text-align: center;"><canvas id="canvasid" width="' + config.width + '" height="' + config.height + '" style="border: 1px solid; z-index: 100; position: relative;">canvas</canvas></div>'
    modes [config.insertmode] (holder, config.inserttarget)
    const canvas = document.getElementById ('canvasid')

    if (canvas.getContext) {
      config.holder  = holder
      config.canvas  = canvas
      config.context = canvas.getContext ('2d')
    } else {
      holder.remove ()
      config.ok = false
    }
  }, [{
    pagetest:  () => /^https?:\/\/(leftypol\.org|leftychan\.net)\//.test (document.location.href) && (document.getElementById ('uniqueip') != null) && (document.querySelectorAll ('div.post.op').length == 1),
    getconfig: () => {
      const target = document.getElementById ('thread-interactions')
      if (target == null) { return { ok: false }; }
      const count  = 60, step = 10

      return {
        ok:     true,
        width:  count * step,
        height: 100,
        count:  count,
        step:   step,
        back:   'rgba(  0,   0,  60, 1)',
        bars:   'rgba(  0,   0, 255, 1)',
        grid:   'rgba(128, 128, 128, 1)',
        insertmode:   'before',
        inserttarget: target,
      }
    },
    getdata: config => {
      const dates = Array.from (document.querySelectorAll ('p.intro time')).map (e => e.innerText.match (/^\d{4}-\d{2}-\d{2}/)).filter (m => m != null).map (m => m [0])
      tools.getdatadatecount (config, dates)
    },
    draw: tools.drawrelative
  }, {
    pagetest:  () => /^https?:\/\/(leftypol\.org|leftychan\.net)\//.test (document.location.href) && (document.getElementById ('Grid') != null),
    getconfig: () => {
      const target = document.getElementById ('Grid')
      if (target == null) { return { ok: false }; }

      return {
        ok:     true,
        width:  400,
        height: 400,
        radius: 8,
        insertmode:   'after',
        inserttarget: target,
      }
    },
    getdata: config => {
      const now  = Date.now () / 1000
      const data = Array.from (document.querySelectorAll ('div.mix[data-bump][data-reply][data-time]')).map (e => ["data-bump", "data-reply", "data-time"].map (s => parseInt (e.getAttribute (s), 10))).map (([b, r, t]) => [now - b, r, now - t])
      config.data = data
    },
    draw: config => {
      const ctx    = config.context
      const w      = config.width
      const h      = config.height
      const radius = config.radius
      const data   = config.data
      const [maxb, maxr, maxt] = Array.from ({length: 3}, (x, k) => data.reduce ((a, b) => Math.max (a, b [k]), 0) || 1)

      data.reverse ()
      for (const [b, r, t] of data) {
        const x = t * w / maxt
        const y = h - r * h / maxr
        const c = Math.floor (b * 255 / maxb)
        const f = 'rgba(' + (255 - c) + ', 0, ' + c + ', 1)'

        ctx.fillStyle = f
        ctx.beginPath ()
        ctx.arc (x, y, radius, 0, 2 * Math.PI, true)
        ctx.fill ()
      }
    }
  }]
)) ({
  drawrelative: config => {
    const ctx   = config.context
    const data  = config.data
    const max   = data.reduce ((a, b) => Math.max (a, b), 0) || 1
    const w     = config.width
    const h     = config.height
    const count = config.count
    const step  = config.step

    ctx.fillStyle = config.back
    ctx.fillRect (0, 0, w, h)

    ctx.strokeStyle = config.grid
    for (let k = 0; k < count; k++) {
      ctx.beginPath ()
      ctx.moveTo (step * k, 0)
      ctx.lineTo (step * k, h)
      ctx.stroke ()
    }

    ctx.fillStyle = config.bars
    for (let k = 0; k < count; k++) {
      const y = data [k] * h / max
      ctx.fillRect (w - step - k * step, h - y, step, y)
    }
  },
  getdatadatecount: (config, datestrings) => {
    // YYYY-MM-DD
    const all = datestrings.reduce ((acc, key) => {
      if (key in acc) {
        acc [key] += 1
      } else {
        acc [key]  = 1
      }
      return acc
    }, {})
    const now = new Date ()
    const key = k => {
      const when = new Date (now)
      when.setUTCDate (now.getUTCDate () - k)
      return when.getUTCFullYear ().toString ().padStart (4, '0') + '-' + (when.getUTCMonth () + 1).toString ().padStart (2, '0') + '-' + when.getUTCDate ().toString ().padStart (2, '0')
    }
    const ret = Array.from ({length: config.count}, (x, k) => all [key (k)] ?? 0)
    config.data = ret
  }
})

Just a demo.

Just noticed that we can now hide replies! Based tech team!

>>34752
You're welcome! (Filters also work now.)

File: 1634352869762.jpg (48.94 KB, 426x639, 1628313217874.jpg)

From the meta thread:

How hard would it be to put a cool-down timer on posts? I'm probably the only mfer who would benefit from it but anyone who dumps anything on this site would appreciate it.

>>34754
I'm not sure if it would be too hard, but it's low-priority compared to other outstanding issues.

File: 1636663917616.txt (4.59 KB, userjs.txt)

Trimmed Options → User JS >>34737 for the recent backend fixes.
① catalog links in div.boardlist >>34604
② batch loop/once WebM setting >>34519
③ top/bottom navlinks in the top bar >>34522
④ catalog link above OP >>34544
⑤ quick reply spoiler sync >>34661

Last50 links on catalog pages:
((count, min) => Array.from (document.querySelectorAll ("div#Grid div.thread")).map (t => [t.querySelector ('a[href*="/res/"]'), t.querySelector ("div.replies > strong")]).filter (([a, s]) => parseInt (s.innerText.replace (/^R: (\d+) .+$/, "$1"), 10) >= min).forEach (([a, s]) => { s.innerHTML += ' <a href="' + a.getAttribute ("href").replace (/^(.+)([.]html)$/, "$1+50$2") + '">L' + count + '</a>'; })) (50, 100)

This can be made more resilient by exposing $config['noko50_count'] and $config['noko50_min'] in something like status.php.

test

Would it be possible to add a feature that shows all oekaki images posted on the site?

>>34757
I did something like this in my imageboard:
{% if post.reply_count >= config.noko50_min  %}
							<a href="{{ post.root }}{{ config.dir.res }}{{ link_for(post, true) }}">[50]</a>
							{% endif %}

Still have to figure out a solution for ukko tho.

>>34760
> Still have to figure out a solution for ukko tho.
My recommendation for the backend, for the general case rather than merely for the ukko family, is to only use the template to check if a last50 href and count have been sent in and if so construct the anchor, but to perform the actual last50 href and count computations in generateRecentPosts where you have more freedom and power. This way you can properly handle per-board $config['noko50_*'] settings due to the openBoard call, which you would be hard pressed to account for in the twig template.
https://git.leftypol.org/leftypol/leftypol/src/commit/199f9f5fd077e3beb9a7091295e390ac75345de1/templates/themes/catalog/theme.php#L428
https://git.leftypol.org/leftypol/leftypol/src/commit/199f9f5fd077e3beb9a7091295e390ac75345de1/templates/post_thread.html#L56
https://git.leftypol.org/leftypol/leftypol/src/commit/199f9f5fd077e3beb9a7091295e390ac75345de1/inc/display.php#L412

> >[50]<

You might want the interface to display the actual config.noko50_count here for that post's board.

>>34761
>but to perform the actual last50 href and count computations in generateRecentPosts where you have more freedom and power.
The ukko problem I face it right it now, is that the href points it to ukko link itself instead of the board, eg: /ukko/res/6+50.html.
Tried messing around with "link" in inc/display.php but without luck so far.
>This way you can properly handle per-board $config['noko50_*'] settings due to the openBoard call
Oh, I see it now. What do you have in mind? The only thing I could think of was to make a query to count every reply and check against noko50 but this seems a little too much.

>You might want the interface to display the actual config.noko50_count here for that post's board.

Done, forgot about it.

>>34762
>is that the href points it to ukko link itself instead of the board
Got it right by doing this:
<a href="{{ post.root }}/{{ post.board }}/{{ config.dir.res }}{{ link_for(post, true) }}">[{{config.noko50_count}}]</a>

>>34762 >>34763
>The ukko problem I face it right it now, is that the href points it to ukko link itself instead of the board, eg: /ukko/res/6+50.html.
If you follow >>34761 you will get the right board and settings due to the openBoard call. Notice how on the overboard index the thread fragments, which include last50 links, are built inside openBoard calls.
https://git.leftypol.org/leftypol/leftypol/src/commit/199f9f5fd077e3beb9a7091295e390ac75345de1/templates/themes/overboards/theme.php#L144

>Oh, I see it now. What do you have in mind?

Quite simply move the last50 href and count determination out of the catalog template and into generateRecentPosts >>34761.
https://git.leftypol.org/leftypol/leftypol/src/commit/199f9f5fd077e3beb9a7091295e390ac75345de1/templates/themes/catalog/theme.php#L428

>Done, forgot about it.

>Got it right by doing this:
Putting the retrieval and use of config.noko50_* values >>34763 >>34760 inside the catalog template is wrong because that template is also used for heterogeneous boards like the overboards and you'd be ignoring the per-board config values of each post's board. This is why the thread fragments of the overboard index are built separately inside their own openBoard calls, before being handed to the index template.

>>34764
>Notice how on the overboard index the thread fragments, which include last50 links, are built inside openBoard calls.
With this example I was able to see clearly now.
I'm going to try modify my theme with these instructions.

Also, I was looking at the issues of your fork and saw "Post Editing feature", some time ago the lainchan fork received a PR to enable edit mode for users, it works, I was able to test under NPFchan, there is only a problem with spaces that I couldn't solve and didn't want to be bother since the Administrator didn't like it the ideia.
https://github.com/lainchan/lainchan/pull/127/commits/e7213d974952b1d1e8e180b3f1c747c51fc18538

>Embedding can only be done at the top of the page #34

The embed in quick reply is managed by the settings.js default, unless you change these line to work without or set to true "show_embed"
https://git.leftypol.org/leftypol/leftypol/src/branch/config/js/quick-reply.js#L243
https://git.leftypol.org/leftypol/leftypol/src/branch/config/js/settings.js#L38

>Option for automatically archiving threads #1

Its not 100% finished but may give you an idea of an archive system.
https://github.com/Circlepuller/Tinyboard/commit/ff4cd3d041677c46e4eeabc3781aa90d58a1f983
https://github.com/Circlepuller/Tinyboard/commit/de6944710b54e38660ab5ba5827a8e07ef0e4fc6

>>34764
>If you follow >>34761 you will get the right board and settings due to the openBoard call. Notice how on the overboard index the thread fragments, which include last50 links, are built inside openBoard calls.
Got it doing this:
>catalog/theme.php
     private function countReplies($board, $id){
	$count_query = query(sprintf("SELECT COUNT(*) FROM ``posts_%s`` WHERE `thread` = %d", $board, $id));
	return $count_query->fetchColumn(0);

}

private function generateRecentPosts($threads) {

$noko50 = $this->countReplies($post['board'], $post['id']);
($noko50 >= $config['noko50_min']) ? $post['noko'] = '<a href="' . $config['root'] . . $board['dir'] . $config['dir']['res'] . link_for($post, true) . '">' . '['.$config['noko50_count'].']'. '</a>' : '';

}


>catalog/catalog.html

{% if post.noko %}
		{{ post.noko }}
{% endif %}

>>34765 >>34766
>I was looking at the issues of your fork
It's not my fork and I'm not even one of the techs, mate. I'm just a run-of-the-mill prole.

>The embed in quick reply is managed by the settings.js default

See >>34572

>private function countReplies

My friend, do you honestly think it likely that the posts would be missing their reply count information when the catalog template already shows reply counts for every thread?
https://git.leftypol.org/leftypol/leftypol/src/commit/199f9f5fd077e3beb9a7091295e390ac75345de1/templates/themes/catalog/catalog.html#L78
< <strong>R: {{ post.replies }} /
https://git.leftypol.org/leftypol/leftypol/src/commit/199f9f5fd077e3beb9a7091295e390ac75345de1/templates/themes/catalog/theme.php#L334
< (SELECT COUNT(`id`) FROM ``posts_$board`` WHERE `thread` = `thread_id`) AS `replies`

>private function generateRecentPosts

This is correct in spirit, although my opinion is that using a plain if statement like a sane person instead of an assignment inside a ternary branch would make for more maintainable code.

>{{ post.noko }}

Doing it this way instead of >>34761 is also fine.

>>34767
>My friend, do you honestly think it likely that the posts would be missing their reply count information when the catalog template already shows reply counts for every thread?
Kek. You're right, just doing:
$post['reply'] >= $config['noko50_min'] was enough.

The href links are fixed now without workaround in the templates, thanks.

Invidious proxy is broke.
Vid as an example

>>34769
Title: `Unexpected char ' ' at line 1, column 1 (JSON::ParseException)`
Date: `2021-11-25T05:45:19Z`
Route: `/embed/N9o1X_TNXWA?autoplay=1&html5=1`
Version: `2021.11.18-b5a96b17 @ master`
<details>
<summary>Backtrace</summary>
<p>

```
Unexpected char ' ' at line 1, column 1 (JSON::ParseException)
from /usr/share/crystal/src/json/lexer.cr:331:7 in 'raise'
from /usr/share/crystal/src/json/lexer.cr:327:5 in 'unexpected_char'
from /usr/share/crystal/src/json/lexer.cr:326:11 in 'unexpected_char'
from /usr/share/crystal/src/slice.cr:213:5 in 'next_token'
from /usr/share/crystal/src/json/parser.cr:13:12 in '_post_json'
from src/invidious/yt_backend/youtube_api.cr:317:12 in 'extract_video_info:video_id'
from src/invidious/videos.cr:972:10 in 'get_video:region'
from src/invidious/routes/embed.cr:122:15 in 'show'
from lib/kemal/src/kemal/route.cr:13:9 in '->'
from /usr/share/crystal/src/primitives.cr:266:3 in 'call'
from /usr/share/crystal/src/http/server/handler.cr:28:7 in 'call'
from /usr/share/crystal/src/http/server/handler.cr:28:7 in 'call_next'
from lib/kemal/src/kemal/filter_handler.cr:21:7 in 'call'
from /usr/share/crystal/src/http/server/handler.cr:28:7 in 'call_next'
from /usr/share/crystal/src/http/server/handler.cr:28:7 in 'call_next'
from /usr/share/crystal/src/http/server/handler.cr:28:7 in 'call_next'
from /usr/share/crystal/src/http/server/handler.cr:28:7 in 'call'
from /usr/share/crystal/src/http/server/handler.cr:28:7 in 'call_next'
from src/invidious/helpers/static_file_handler.cr:167:15 in 'call'
from /usr/share/crystal/src/http/server/handler.cr:28:7 in 'call'
from /usr/share/crystal/src/http/server/handler.cr:28:7 in 'call'
from /usr/share/crystal/src/http/server/handler.cr:28:7 in 'call_next'
from lib/kemal/src/kemal/init_handler.cr:12:7 in 'process'
from /usr/share/crystal/src/http/server.cr:500:5 in '->'
from /usr/share/crystal/src/primitives.cr:266:3 in 'run'
from ???
```
</p>
</details>

>>34769 >>34770
The first script of >>34716 continues to work.

>>34769 >>34770
The issue is an indirect invidious bug caused by the crystal-lang upstrem: https://github.com/iv-org/invidious/issues/2612
The invidious workaround with manual decompression is in testing: https://github.com/iv-org/invidious/pull/2623
When it's merged and the instances update or when crystal-lang fixes the HTTP::Client, whichever comes sooner, the issue will go away.

https://git.leftypol.org/leftypol/leftypol/src/branch/config/post.php#L1115
Is this really how the PDF thumbnail is made? I tried doing it by hand on my machine but it wouldn't let me use `convert' on PDF files because there are known RCE vulnerabilities regarding that:
https://bugs.archlinux.org/task/59778

>>34588
Would it be possible to have an option to search for posts based on filename too? It would be extremely useful

>>34774
>Would it be possible to have an option to search for posts based on filename too?
Sure, but the non-body field test would have to be loosened from always using equality.
https://git.leftypol.org/leftypol/leftypol/src/commit/199f9f5fd077e3beb9a7091295e390ac75345de1/search.php#L124
> $like .= '`' . $name . '` = '. $pdo->quote($value);

A new filter type can be added here:
https://git.leftypol.org/leftypol/leftypol/src/commit/199f9f5fd077e3beb9a7091295e390ac75345de1/search.php#L60
> if(!in_array($name, array('id', 'thread', 'subject', 'name'))) {

The file names are inside a json_encode in the 'files' field of posts.
https://git.leftypol.org/leftypol/leftypol/src/commit/199f9f5fd077e3beb9a7091295e390ac75345de1/templates/posts.sql#L13
> `files` text DEFAULT NULL,
https://git.leftypol.org/leftypol/leftypol/src/commit/199f9f5fd077e3beb9a7091295e390ac75345de1/inc/functions.php#L1075
> $query->bindValue(':files', json_encode($post['files']));

The 'files' structure is an array of objects with a 'filename' field holding the upload file name.
https://git.leftypol.org/leftypol/leftypol/src/commit/199f9f5fd077e3beb9a7091295e390ac75345de1/post.php#L797
> $file['filename'] = urldecode($file['name']);

So as a trial version a LIKE test can be applied to a new files:value filter in search.php. After that with a little more effort the test can be targeted at the 'filename' field with a json path query like:
'$[*] ? (@.filename like_regex ".*valuegoeshere.*" flag "i").size()'

but this will depend on the quality of the SQL/JSON support available in the exact database type and version in use.
https://www.postgresql.org/docs/12/functions-json.html

>YouTube now embeds as Incognet's invidious on onion site
Amazing. Thank you based devs

Would be possible to scramble original filename? It's a pain in the ass to do it manual.

File: 1638483249769-0.jpg (175.44 KB, 680x986, 0.jpg)

File: 1638483249769-1.png (208.37 KB, 798x680, 1.png)

>>34777
Luckily I have done this before for 8chan, I had to fiddle with it a bit but now it seems to work. Add this to your User JS and it will automatically rename the files just to their index like with this post:
function getFiles(t) {
    return jQuery(t).children('.tmb-container').map(function (i, e) {
        return $(e).data('file-ref');
    });
}

function changeName(i, file) {
    var name = i + '.' + file.name.split('.').pop();
    var newFile = new File([file], name, { type: file.type }); 
    return newFile;
}

function renameFiles(files) {
    return files.map(changeName);
}

function removeFiles(t) {
    jQuery('.dropzone .remove-btn').each(function (i, e) {
        $(e).trigger('click');
    });
}

function addFiles(t, files) {
    transfer = new DataTransfer();
    for (i = 0; i < files.length; i++) {
        transfer.items.add(files[i]);
    }

    jQuery(t).parents('.dropzone').trigger(
        $.Event('drop', {
            originalEvent: new DragEvent(
                'drop',
                { dataTransfer : transfer})}));
}

function stripFilenames(t) {
    var files = getFiles(t);
    removeFiles(t);
    addFiles(t, renameFiles(files));
}

function observer(e) {
    // You have to remove it first to avoid recursion.
    jQuery('.file-thumbs').unbind("DOMSubtreeModified", observer);
    // Always do it on the main form
    stripFilenames(jQuery('.file-thumbs').first()[0]);
    jQuery('.file-thumbs').bind("DOMSubtreeModified", observer);
}

// Initialize
jQuery('.file-thumbs').bind("DOMSubtreeModified", observer);

For a backend version of Anon's >>34778 code a checkbox can be added to the post form wherever convenient
https://git.leftypol.org/leftypol/leftypol/src/commit/0e98c35dc59f42db891ce680f0995ec40cbb782c/templates/post_form.html#L51
then the $file['filename'] can be suppressed between $file['extension'] and $config['filename_func']
https://git.leftypol.org/leftypol/leftypol/src/commit/0e98c35dc59f42db891ce680f0995ec40cbb782c/post.php#L797
if ($config['suppress_filenames'] && isset($_POST['suppressfilenames'])) $file['filename'] = "$i." . $file['extension'];

Checkbox sync is in >>34655 and memory leak cleanup in >>34657 and >>34658.

>>34779
You can change the filename doing this way, but it doesn't change the json value for some reason.

Hey, when you dont F5 a thread, the auto update doesnt remove post deleted by mods, so you can end up replying to already banned retards
what about quickly checking if the replied to post still exist when sending it, and displaying a warning if it does not ?

also what about inline reply expansion

>>34781
>the replied to post
You might reply to several posts, with only one of them having been deleted. You might mean some of the post references in your reply as part of the substance of your reply, rather than as posts being replied to.

What are your thoughts on auto update applying some visual marking to those posts that are still present in your view of the thread but would go away if you were to press F5?


>>34783
Good idea, NPFchan faced a lot of abuse so it has some good moderation stuff that we can sample. Hash filters currently can't be done through the moderation interface.
There were plans for a vichan-NPFchan uplift (getting all the stuff lainchan never pulled), but unfortunately most of the development manpower is on hold for a while and (as one may have noticed) available time is mostly focused on maintenance and easy wins rather than new features and infrastructure improvement. People getting involved in the git repo would help this massively.

I haven't implemented phashes yet but it's always an option and possible with existing tools. I feel that most people able to intentionally evade a hash ban should be motivated and able to evade a phash, so it might be a wasted and computationally expensive effort.

>Perceptual hashing >>34783
>I feel that most people able to intentionally evade a hash ban should be motivated and able to evade a phash, so it might be a wasted and computationally expensive effort. >>34784
This would autoban false positives. Once autobanning a small fraction of innocents is conceded, that would provide an incentive for the spammers to push for a higher false positive rate.

Concerning >>>/meta/15307
>How the hell do you turn it off?
the current snow test is
https://git.leftypol.org/leftypol/leftypol/src/commit/b3db9c52b70f0f7103b96b61891f752791e996ab/js/winter-snow.js#L3
> var snow = localStorage['snow'] ? false : true;
while the current option uncheck handler is
https://git.leftypol.org/leftypol/leftypol/src/commit/b3db9c52b70f0f7103b96b61891f752791e996ab/js/winter-snow.js#L17
> localStorage.snow = false;
which causes snow to remain true regardless of the checkbox state.

To disable the effect without waiting for a backend fix use the dev tools console to set localStorage.snow to a value that evaluates to true in a conditional, such as
localStorage.snow = "nothanks";

then check in dev tools storage that your browser stored the new value, then reload the page.

Bug report that I think is reproducible:
In the following post I place a youtube link in the embed and the enter three lines of [code] text. The result is that only the embed is posted with zero text whatsoever.

text

textblabla

textan bloo blee blouf

The text missing from the above are these three lines, which perhaps (testing) will be posted normally when I now do not enter an embed in the following post:

text

textblabla

textan bloo blee blouf

>>34789
>The text missing from the above
The text is present:
<div class="post reply" id="reply_12587" data-board="tech"><p class="intro"><a id="12587" class="post_anchor"></a><input type="checkbox" class="delete" name="delete_12587" id="delete_12587"><label for="delete_12587"><span class="name">Anonymous</span> <time datetime="2021-12-20T14:45:22Z">2021-12-20 (Mon) 14:45:22</time></label>&nbsp;<a class="post_no" id="post_no_12587" onclick="highlightReply(12587)" href="/tech/res/6724.html#12587">No.</a><a class="post_no" onclick="citeReply(12587)" href="/tech/res/6724.html#q12587">12587</a></p>    <div class="video-container" data-video="NLpPyuzxSf4"><a href="https://youtu.be/NLpPyuzxSf4" target="_blank" class="file"><img style="width:255px;height:190px;" src="/vi/NLpPyuzxSf4/0.jpg" class="post-image"></a></div>         <div class="body"><pre class="code lang-">text</pre><br><pre class="code lang-">textblabla</pre><br><pre class="code lang-">textan bloo blee blouf</pre></div></div>

You can apply this CSS workaround:
pre { clear: both; }

File: 1640037484931.png (79.16 KB, 440x173, ClipboardImage.png)

>>34788
For me (desktop), this text shows a scroll bar.
I assume the issue is that it's invisible on your device so it looks like it's just cut off.

>>34792
Very strange. It is indeed invisible on my end, still.
I'm on desktop using Tor Browser, latest version, which is based on Firefox ESR, with javascript disabled (highest security setting).
Is [code] a javascript function? It doesn't seem like it. Another strange thing is that sometimes it works and I can see the [code] text like regular (leading me to speculate if it's to do with the number of lines). I did a similar test post on /siberia/ with typed in another way with an embed and it showed up normal, which made me think you had just disabled [code] on /leftypol/ as a board specifically. This was all without JS too (I always post without JS).

>>34793
I turned off JS (also desktop Tor; Ubuntu-based OS) and it still showed up. There is no JS involved, just CSS. That is weird. It may be a far show and I have no evidence for this but maybe Firefox's recent theming changes affected it for your OS/current-theme.

>>12724
$(document).on('ajax_after_post', function(e, r) { localStorage.own_posts = '{}'; });

Update of js/show-own-posts.js to allow users to opt out of (You) tracking. >>12724

>>34796
You are a hero of leftypol

So who's the dummy who shat up APNG uploads because of this weird error?
>Failed to resize image! Details: gm convert: fcTL: no space in chunk cache (/tmp/phpsZjJMc).

>>34798
APNG upload works in principle. >>>/meta/15840 The error is "benign" but for separate reasons shell_exec_error considers any stderr output an error. >>>/leftypol_archive/1787 The workaround is the same as for the iCCP family of errors. >>34564 The error means that your image has too many sPLT, tEXt, zTXt, iTXt or unknown chunks for libpng's taste.
https://github.com/glennrp/libpng/blob/a37d4836519517bdce6cb9d956092321eca3e73b/pngrutil.c#L3070
png_chunk_benign_error(png_ptr, "no space in chunk cache");

https://github.com/glennrp/libpng/blob/a37d4836519517bdce6cb9d956092321eca3e73b/pngstruct.h#L440
   /* Added in libpng-1.4.0: Total number of sPLT, text, and unknown
    * chunks that can be stored (0 means unlimited).
    */
   png_uint_32 user_chunk_cache_max;

In practice this most likely means that your animation has more frames than leftypol->gm->libpng is currently willing to quietly accept. I assume that your image was good faith but it's also possible that you were attempting a resource consumption attack. I cannot check this as you have not provided a link to an external upload of your image. >>34563 For future reference, uploading your file to http://0x0.st/ or similar and including a link will improve your bug reports.

>>34799
https://litter.catbox.moe/aj8vsc.png

I'm fairly certain I've uploaded this exact animation before here with no problem, and certainly without trouble on other image boards. Fix your shit, I'm never using that webp crap.

>>34797
>>34797
>>34797
Update on the implementation of this?

>>34800
Your image is legitimate >>>/meta/15862 but it has 6228 frames and 12462 chunks.
< In practice this most likely means that your animation has more frames than leftypol->gm->libpng is currently willing to quietly accept. >>34799
You have the option of uploading it spoilered, which bypasses thumbnailing. >>34684 Since the image is a type 3 8-bit PLTE with single-index transparency (tRNS=0x00) which was converted from a gif using gif2apng.sf.net, you also have the option of uploading the source gif, or losslessly reobtaining it with apng2gif. >>>/meta/15864 The techs can try adding [0] to the first %s of $config['convert_args'] to explicitly request only the first source frame, which may or may not fix the problem.
https://git.leftypol.org/leftypol/leftypol/src/commit/c5814178aee666b34902665a0bd0b4667758a875/inc/config.php#L773
     // Command-line options passed to ImageMagick when using `convert` for thumbnailing. Don't touch the
    // placement of "%s" and "%d".
    $config['convert_args'] = '-size %dx%d %s -thumbnail %dx%d -auto-orient +profile "*" %s';

Another option is the general workaround shared with the iCCP family of errors. >>34799 >>34564 >>>/leftypol_archive/1787

>>34796
Hopefully this is update made by a helpful anon arrives soon for leftypol.

File: 1641893877973.png (7.25 KB, 708x236, posthistory.png)

suggestion: username registration and post history. it's the next logical step for this website.

>>34804
cry about it

Viewing the post history of an IP >>34804 for site administration didn't originate with lefty, lain or vichan, in this family it goes all the way back to Tinyboard.
https://github.com/savetheinternet/Tinyboard/commit/78f3ea783394dba14b51b27f7f2db3974ce8b8b3#diff-e7c25d7d73eaa99b1564b025926e24d835d4322fdb65f4b9473b357f0ef64f44
Reusing the same functionality to allow users to access a read-only view of their own post history might be reasonable on a site that doesn't allow VPNs or Tor, but on a site that does allow them it's probably not a good idea.
https://git.leftypol.org/leftypol/leftypol/src/commit/c5814178aee666b34902665a0bd0b4667758a875/inc/mod/pages.php#L892
https://git.leftypol.org/leftypol/leftypol/src/commit/c5814178aee666b34902665a0bd0b4667758a875/templates/mod/view_ip.html#L204
Here's some harmless fun with localStorage.own_posts:
((sortkeys, link, divide, cites, install, slice, groups) => {
  const own    = JSON.parse (localStorage.own_posts || '{}')
  const boards = sortkeys (Object.keys (own))
  const count  = boards.reduce ((acc, item) => acc + own [item].length, 0)
  const html   = ['own posts: ' + count + ' boards: ' + boards.length]
  boards.forEach (b => {
    const ownb = own [b].reverse ()
    const have = ownb.length
    const [div, mod, left] = divide (have, slice, groups)
    html.push ('board: ' + link ('/' + b + '/index.html', '/' + b + '/') + ' ' + link ('/' + b + '/catalog.html', '&copy;') + ' count: ' + have + ' = ' + div + ' * ' + slice + ' + ' + mod + ' + ' + left)
    for (let k = 0; k < div; k++) {
      html.push (cites (b, ownb, slice, k, slice))
    }
    if (mod) {
      html.push (cites (b, ownb, slice, div, mod))
    }
  })
  install (html)
}) (
  arr => arr.map (s => [s, s.toUpperCase ()]).sort ((a, b) => a [1] < b [1] ? -1 : a [1] > b [1] ? 1 : 0).map (p => p [0]),
  (href, text) => '<a href="' + href + '">' + text + '</a>',
  (have, slice, groups) => {
    const take = Math.min (have, slice * groups)
    const mod  = take % slice
    return [(take - mod) / slice, mod, have - take]
  },
  (board, arr, slice, skip, now) => arr.slice (skip * slice, skip * slice + now).map (s => '>>>/' + board + '/' + s).join (' '),
  html => {
    const old  = document.getElementById ("ownposts-report")
    if (old) { old.remove (); }
    const node = document.createElement ("div")
    node.setAttribute ("id", "ownposts-report")
    node.setAttribute ("style", "border: thin solid;")
    node.innerHTML = html.map (s => '<p>' + s + '</p>').join ("")
    const foot = document.querySelector ('footer')
    if (foot) {
      foot.parentNode.insertBefore (node, foot)
    } else {
      document.body.appendChild (node)
    }
  },
  45, 2
)

>>34806
A page history for a user it's quite simple to make in php, it's just a gimp mod_view_ip and template as well.
I got this ideia from wizchan and works quite good. But that leaves you with one problem, vpn, since tor is easily blocked. But again, in my imageboard vpn and tor isn't allowed.
https://wizchan.org/history.php

>>34807
If you have some influence on the wizchan admin tell him to fix the double escaping in his code tags: https://wizchan.org/meta/res/60390.html#60449 08/24/21.


>>34808
Sorry, I don't even post on wizchan.

>>34796
Thank you writing for the code. It has been tested and is now added to the site. (I made a minor change to put them in a frameset labeled (You)s ).
https://git.leftypol.org/leftypol/leftypol/issues/66
Do you have any issue with me trying to upstream this to vichan and lainchan?

>>34811
>Do you have any issue with me trying to upstream this to vichan and lainchan?
None at all. Use it freely and in good health. Same for the other fixes I post here.

Separately, I'd like to point out that you need to treat show-own-posts.js.txt >>34796 as UTF-8 to get Marcin's last name right.

The database has been changed to a different engine (MyISAM -> InnoDB). Reverted lmao, vichan isn't concurrency-safe so a couple of people got deadlocks so we noped out.
If you notice anything weird/slow/broken, let me know.
We've also upgraded the caching, which will hopefully provide major speed improvements.

I think one of the biggest issues we should focus on for now (high impact, possible easy win) is the large delay between a post appearing on the website and the poster being told their post is successful.

>>34812
Fixed, thanks.


>>34813
https://git.leftypol.org/leftypol/leftypol/commit/e906ac74514a415c73593edfad5b540df9d67ac5?style=split&whitespace=
You are ignoring the state of $noko, which if false, such as by manual nonoko, causes:
https://git.leftypol.org/leftypol/leftypol/src/commit/e906ac74514a415c73593edfad5b540df9d67ac5/post.php#L1429
$redirect = $root . $board['dir'] . $config['file_index'];

so you might want the same buildIndex before fastcgi_finish_request order when $noko is false as for "if ($post['op'])".

>>34814
>>34815
These should now be fixed, thank you.

these mf's using php lmao

File: 1642673782004.jpg (3.59 MB, 3720x2800, rare-stallman.jpg)

I'd just like to say I appreciate the work being done to keep the site going
I fetch updates to the repo every now and then just to see how it's doing :3

Wouldn't be possible to expand original filename on hover like what 4chanX/Ponychan does? The current implementation does this with title.

>>34819
why even limit the filenames?

>>>/meta/16074
Array.from (document.querySelectorAll ("span.trip")).forEach (e => { e.parentNode.parentNode.parentNode.querySelector ("div.body").innerHTML = "I am a child seeking attention."; });

idea from: https://textboard.org/prog/34#t34p105

>>34820
My guess is preventing overlap when uploading multiple images.

>>34821
Nice.

>>34818
Great to hear! Now that things have settled down and I have a bit of extra time, I'm focusing on a new effort to rebase the site software from vichan(2015)->lainchan(2017)->leftypol_lainchan onto current vichan, with functional patches from lainchan and NPFchan cherry-picked (excluding broken or unneeded patches like lainchan's broken overboard posting and Slack notification support, NPF's cookie tools and forced flags).
If there's any other vichan-based IBs with features you think we should cherry-pick, let me know.

What this means is a few more features, a far less broken base, and no loss of features.

The functional part (styling ignored) is about a third of the way done but it should always remain stable and working.
https://git.leftypol.org/leftypol/leftypol_vichan/

(The reasons I'm doing this rebase as opposed to moving to another imageboard software entirely is the relative ease, the guarantee of feature parity, and the assurance of migrating without data loss. That said, it could easily happen in the long-term if one is considered objectively better at this scale)

>>34822
To enable overboard post, I this way (using ukko2 from lainchan):
$isukko = true; // only here for exclude somethings because the condition 'no_post_form' will be always false
return Element('index.html', array(
				'config' => $config,
				'board' => $board,
				'no_post_form' => false,
				'isukko' => $isukko,
				'body' => $body,
				'mod' => $mod,
				'boardlist' => createBoardlist($mod),
				'boards' => $boardsforukko2,
				'antibot' => $antibot
			));

then, in the post_form.html:
<table>
		{% if isukko %}
		<tr>
			<th>
				{% trans %}Board{% endtrans %}
			</th>
			<td>
					<select id="boardsUkko" name="board">
						<option value=""></option>
					{% for board in boards %}
						<option value="{{ board.uri }}">{{ board.uri }}&nbsp; -&nbsp;{{ board.title }}</option>
					{% endfor %}
					</select>
					{{ antibot.html() }}
			</td>
		</tr>
		{% endif %}

at this stage is working and need minor modifications in templates because of the widely used 'no_post_form' condition.

>>34823
I'm aware of that, but unless I am mistaken it's incompatible with the antispam function because it requires the antispam to be generated for that page, for the correct board that the post ends up on, which is impossible to predict.
I tried using lainchan.org's /mega/ ukko and it kept telling me my post looked automated.

>>34824
weird, it works fine on npfchan.

File: 1642935677321-0.gif (3.63 MB, 854x480, entrapta sparks.gif)

File: 1642935677321-1.png (1.11 MB, 1920x1090, entrapta weird.png)

>>34822
>I'm focusing on a new effort to rebase the site software from vichan(2015)->lainchan(2017)->leftypol_lainchan onto current vichan, with functional patches from lainchan and NPFchan cherry-picked
neato. have some motivational Entrapta

Bug report:
<Hide a couple of threads
>On page refresh of the overboard see the recently bumped [hidden threads] in the correctly hidden manner, but when scrolling down to pull more, older threads and a couple of said pulled threads have been [hidden] since before - they for some odd reason show up as unhidden.

>>34827
Post your localStorage.hiddenthreads when the bug occurs.

>>34828
Right now I have a lot of the threads hidden, but this happens when I have just a few threads hidden too.

>>34827
Thanks, I can look into it after work if that other anon doesn't beat me to it. Are the hidden threads being duplicated (like, hidden on the first page, then when loading more it's showing up a second time, unhidden) or is it just forgetting to hide ones that are loading up after the first page?

>>34830
>Are the hidden threads being duplicated (like, hidden on the first page, then when loading more it's showing up a second time, unhidden)
No
>or is it just forgetting to hide ones that are loading up after the first page?
Yes exactly

>>34830
> I can look into it after work if that other anon doesn't beat me to it
It's all yours, mate.

>>34827
I've make a quick fix.
https://git.leftypol.org/leftypol/leftypol/commit/0950d4d09d18da30fd0a1d02085e5b8e2782fa49
If anyone wants to look in further, it seems that filter() in post-filter.js doesn't get an up-to-date locallist, so anything after the initial page isn't searched. That trigger above prompts locallist to be regenerated.

>>34833 (me)
I've also noticed another pre-existing (issue?) where hidden threads on the overboard won't have any posts when unhidden. I'm considering that a wontfix because I have more important things to do than making sure there's posts in threads we explicitly choose not to see.

File: 1643174823137.jpg (79.82 KB, 720x540, Mjr. Dr. A.J.G.jpg)

>>34826
Nice goggles.

>>34822
It's 75% complete, excluding theming.
The last quarter will be easier since it's leftypol code and most will just be config changes and unneeded patches. After that, it's just fixing 30 small bugs I noticed along the way, bug checking and porting the CSS themes.
>NPFchan features complete
>lainchan (vanilla) features complete
(excluding rejected features)

>>34833
I think this was only a partial fix (for "hide threads from this board", which now works on scroll), but individual hidden threads still are subject to the original bug in question, namely that they generate on overboard scroll unhidden when they're not supposed to be.

>>34836
Huh, seemed to work for me when testing, not sure what's up with that. It was supposed to fix that original bug.

>>34837
Yeah doesn't seem to have worked, in my testing

So I don't have Internet at home due to being a poorfag but I used VPN at my public library, is that less secure than doing so at home?

While on VPN I can access all the sites that are autoblocked and can torrent freely

wonder if you could use imagemagick or ffmpeg or some other library to detect and block images with watermarks in them

>>34839
Wrong thread. The answer entirely depends on your threat model: who/what are you trying to be secure from?

>>34840
What images do you have in mind? Is something happening when I'm not here?


>>34843
i think they could be easily detected by an algorithm despite being pretty hidden to the naked glazed eyes of a person scrolling through an imageboard. soyjaks are pretty high contrast and always have a distinct color profile and whatnot from most images anyways

>>34843
just don't sample the first frame if there are multiple :^)
The thing about algorithmic detection is it's always a cat and mouse game.


Whoever implemented this captcha just made it impossible to post on Palemoon. Thanks for pushing more gay fucking Google monopoly web "standards".

>>34846
These are just the default vichan stylesheets.
https://github.com/vichan-devel/vichan/tree/master/stylesheets

>>34848
i noticed they have some that this site doesnt

>>34849
Fair enough. Fortunately this transition >>34822 should bring them all in, when it eventually happens.
Do you use any of them?

>>34847
>Palemoon
use IceCat
>>34850
no, just thought it'd be nice to have more themes

incogtube embeds are fucked up i think

>>34852
Are the incogtube embeds working again? Any suggestions of more reliable invidious instances are welcome, so long as they are proxying and not just a frontend.

Update of >>34686 for the new file_multiple[].
((count, spoilers) => {
  const dest = document.querySelector ("tr#upload > td.upload-area")
  if (dest == null) { return; }
  let   have = dest.querySelectorAll ('input[type="file"]').length
  if (have >= count) { return; }
  const sepa = '<br class="file_separator"/>'
  const file = n => (suf => '<input type="file" name="file' + suf + '" id="upload_file' + suf + '">') (n == 1 ? "" : ("" + n))
  const spoi = n => (suf => '<span class="spoilercontainer"><input id="spoiler' + suf + '" name="spoiler' + suf + '" type="checkbox"><label for="spoiler' + suf + '">S' + n + '</label></span>') (n == 1 ? "" : ("" + n))
  const add  = []

  const cleanmulti = dest => {
    const multi = dest.querySelector ('input[type="file"][multiple]')
    if (multi == null) { return false; }
    multi.remove ()
    return true
  }

  if (spoilers) {
    (e => { e.nextSibling.remove (); e.remove (); }) (document.querySelector ("input#spoiler"))
    for (let k = 1; k <= count; k++) {
      add.push (spoi (k) + file (k))
    }
    dest.innerHTML = add.join (sepa)
  } else {
    if (cleanmulti (dest)) { have--; }
    for (let k = have + 1; k <= count; k++) {
      add.push (sepa)
      add.push (file (k))
    }
    dest.innerHTML += add.join ("")
  }
}) (5, false)

This allows files from different directories and shows file order and names for potential per-file spoilers. >>34570 >>34744

test: >>>/meta/16815

>>34853
if youtube has turned off embeds for the video, then incogtube doesn't work at all, let alone in embed

Is there a way to allow oekakis for tor users by loading different wpaint settings? The load image features can be disabled, see https://github.com/websanova/wPaint/issues/113

>>34853
Not invidious, but Piped seems pretty good. I think this is kavin.rocks 's instance. There seem to be multiple video feeds that need to be allowed in NoScript but they are all v3 tor proxies

piped2bbch4xslbl2ckr6k62q56kon56ffowxaqzy42ai22a4sash3ad.onion/

>>34857
this instance seems not to play videos without allowing a non-torified domain, so actually I was wrong, nevermind. Pretty nice UI though, fits more videos on a 1kx1k window than Incognet, maybe there is a better instance out there.

get rid of /alt/, it inundates the side boards with low-effort shitters

>>34822
Update: There were delays due to other priorities and burnout, but the functionality is essentially complete and now it just needs some styling changes.
After that I might open an instance to public testing, but I don't think the ultimate switch-over will happen for a while, at least until site activity stabilizes and thread migration is tested.

Currently there's a 500 Internal Server Error response to requests for status.php, causing >>13960.

>>34861
status.php was never upgraded in the move to Composer, causing it to crash on the require_once('inc/functions.php') line. I've made a hotfix that should resolve the problem, which will be updated in the git codebase soon

I think the site is wigging out to DDOS, I keep getting server down messages and my posts duplicate or don't post at all.

>> console.log (Array.from (new Set (Array.from (document.querySelectorAll ("span.name")).map (e => e.innerText))).sort ().map ((s, idx) => (idx + 1).toString ().padStart (4, " ") + " " + s).join ("\n"))
   1 Alexandra Kollontai
   2 Alexandra Petrovna Kim
   3 Angela Davis
   4 Camila Vallejo
   5 Celia Sánchez
   6 Chizuko Ueno
   7 Clara Zetkin
   8 Constance Markievicz
   9 Elizabeth Gurley Flynn
  10 Emma Goldman
  11 Gladys Marín
  12 Helen Keller
  13 Itō Noe
  14 Juliet Chin
  15 Kathleen Neal Cleave
  16 Kshama Sawant
  17 Li Qiu
  18 Lin Guan Ying
  19 Linda Chen
  20 Louise Michel
  21 Lucy Parsons
  22 Lucía Sánchez Saornil
  23 Marsinah
  24 Marta Harnecker
  25 Mother Jones
  26 Nadezhda Krupskaya
  27 Nathalie Le Mel
  28 Nguyễn Thị Định
  29 Rosa Luxemburg
  30 Simone de Beauvoir
  31 Soong Ching-ling
  32 Vilma Espín
  33 Voltairine de Cleyre
  34 Võ Thị Sáu
  35 Võ Thị Thắng
  36 Đặng Thùy Trâm

data: >>>/meta/17

A member of staff can perform the following test with impunity. Pick a random post, inspect its checkbox, edit the number in id and name "delete_NNN" to some higher number that has not yet been reached by post ids on that board, and report that post with a test message. This simulates reporting a post that has been deleted immediately before submitting the report, but without having to actually delete anything. This should result in a false fetch
https://git.leftypol.org/leftypol/leftypol/src/commit/985d6f4dd66bfead158c2be016024347073f8864/post.php#L340
https://www.php.net/manual/en/pdostatement.fetch.php#refsect1-pdostatement.fetch-returnvalues
which causes the link_for in the subsequent event call argument list to attempt false['id'], resulting in >>>/meta/18331. In that case something similar to
// check if post was deleted before the report arrived
if ($thread === false) continue;

could be added just after the fetch.

>>34865
or you can just do:
$thread = $query->fetch(PDO::FETCH_ASSOC);

		if(!$thread)
			error('404');

>>34866
Reports support multiple posts at once.

>>34867
it stills works if i deliberate change one of the hidden inputs to a higher a number and the others reports are normal. the error() isn't triggered and the (valid) reports goes normal and the undefined key isn't triggered aswell

>>34868
If your statement is true within the context of a correctly performed >>34865 test, then simply provide us with a var_dump($thread) for the non-existent post id, so that we can see what $query->fetch returned while obeying the restrictions;
> WHERE `id` = :id
> $query->bindValue(':id', $id, PDO::PARAM_INT);

>>34869
youre actually right. the earlier tests i did, was selecting the posts and going down to where report-delete.html is being rendering and press report from there. it never considered the altered value. when i did more tests and reported from the quick-post-controls.js, the altered post id begins to trigger the error('404')

>trying to upload 5 pics
>collective size is less than 18mb
>File Too Big
<hmm.jpg
>upload a 50mb video as a test to see if file size got decreased
<uploaded perfectly
The fuck is going on?

>>34871
I don't know. Can you zip up the 5 pictures and post that so I can test?

>>34872
Sorry for late response, I realized the problem. I forgot the image size limit also applies to literal size, so a 11000 pixel image of 4mb reads as too large. Thanks for the response though.

The backend currently responds with
> Content-Type: application/octet-stream
to requests for jfif files >>>/leftypol/928733 which causes >>>/meta/19540. If this is switched at the server level to
< Content-Type: image/jpeg
or similar, the problem will go away.

The default catalog hover:
https://git.leftypol.org/leftypol/leftypol/src/commit/6f2e953bd51e273af63e49b457ab410c6e33684a/stylesheets/style.css#L865
.theme-catalog div.thread:hover {
  background: #D6DAF0;
  border-color: #B7C5D9;
}

Dark Red currently lacks catalog rules so it gets the default.
https://git.leftypol.org/leftypol/leftypol/src/commit/6f2e953bd51e273af63e49b457ab410c6e33684a/stylesheets/dark_red.css

The lainchanjp catalog hover:
https://git.leftypol.org/leftypol/leftypol/src/commit/6f2e953bd51e273af63e49b457ab410c6e33684a/stylesheets/lainchanjp.css#L653
.theme-catalog div.thread:hover {
  background: #4e4e4e;
  border-color: #1f1f1f;
}

Custom catalog hover can be added to Dark Red and friends to fix >>>/meta/19655.

Can the /tech/ team try and implement optional spoilers, at least for /siberia/? It's a real pain in the ass because a bunch of OPs are arbitrarily spoilered by the mods for being porn…. on a /b/ board. I get that overboard has all boards on it but making it optional ought to at least give non-prudes less of a headache searching catalog.
An example of such a script https://pastebin.com/R5G1JvFy (https://archive.ph/WOccP) by the late Bell.


You need to add the ability to search thread headers. I cannot find threads that I follow with the search function.

>>34878
Use the catalog search

>>34879
Thanks, Mah brudda.

Here's a recurring use-case problem:
Say I write a post and it had a formatting error or something. Let's say the thread is somewhat active and I copied my reply, deleted it and try to repost it. This will lead to a multitude of problems:
1. Since the thread not only bumped and a lot of people have the thread opened (which doesn't auto-update to correspond to the post-deletion!), the amount of eyes at the deleted post is now very high.
2. As I try to repost the corrected post fast to at least indirectly counteract this apparent bug, I am met with a hindrance which exacerbates the mess: a "flood detected" error message. Now I'm sitting waiting for an entire minute to post my corrected post to the deleted one that already have multiple green >>111111 replies.

Proposed solutions:
a. refresh the contents of the thread for all having the thread opened when a post is deleted
b. don't count a deleted post as a post in anti-spam mechanism
c. both of the above

>>34881
d. don't make mistakes

>>34881
This has been brought up previously >>34781 but there wasn't enough interest from the bug reporter to answer a follow-up >>34782 question.

>>34883
I guess >>34782 sounds like a good solution too. But I still think not counting deleted posts as posts in the anti-spam mechanism is still a good addition too. >>34881

>>34882
lmao fuck, why didn't I think of that

Here's a patch to implement the first option from >>34881 and >>34782 to make auto-reload.js mark deleted posts. Theme maintainers can customize the marking using the div.post.reply.auto-reload-removed selector. JS users can do the same in User CSS. Deleted posts are not considered important enough to reset the update timer, but if this is desired the removed_posts counter is available for this purpose. To test, inspect and edit a reply id to a non-existent one. Keep in mind that this is narrowly aimed at marking deleted posts, and auto-reload.js has other bugs >>>/leftypol_archive/1759 with which this patch does not concern itself.

>>34885
Is this not being implemented by default?

Also I tried copy-pasting the contents of the .txt into first User CSS and User JS and neither seemed to have any result on thread. Or does it require browser restart / clearing cookies and cache?

>>34886
That is a patch for files served to you by the backend. So first we wait patiently until the techs apply the patch on the backend. After that, if you don't like the default visual marking for deleted posts, you put
div.post.reply.auto-reload-removed {
  border: ...;
  ...
}

into User CSS and replace the ellipses with your own rules.
https://developer.mozilla.org/en-US/docs/Web/CSS/border#syntax

you made a mistake in https://leftypol.org/robots.txt
remove the last "Allow: /" line because A) it overrides all your preceding disallow rules, and B) is redundant/unnecessary, since anything not disallowed is already allowed by default
read https://www.robotstxt.org/robotstxt.html

your rotating banner system (/banners.php) is inefficient because it's impossible for users to cache these images in their browsers. everyone is constantly re-downloading previously-seen banners.

you can see if a file is already cached or is downloaded by refreshing a page (e.g. https://leftypol.org/banners.php ) by checking http responses in firefox in the Network tab in Firefox Developer Tools (ctrl+shift+i) and seeing if it says "cached" under the "Transferred" column for the file

you can instead make it so twig serves the direct path to a random image from your banners folder instead of sending it to your inlined banners.php image file stream so that browsers can actually cache these images. this can speed up frequent visitors' page loads and reduce a bit of bandwidth per frequent visitor.

1. go to /inc/lib/Twig/Extensions/Extension/Tinyboard.php
2. add this line in that list of Twig extension functions:
new Twig_SimpleFunction('random_banner_url', 'twig_random_banner_url'),

(don't forget to put a comma at the end of that previous item or you'll get php error / blank page)
3. at the end of the file add this function definition:
function twig_random_banner_url() {
	$path = dirname(__DIR__, 5) . '/banners/';
	$isDirEmpty = true;
	
	if (!file_exists($path)) {
		return '/static/blank.gif';
	}
	
	$handle = opendir($path);
	while (false !== ($entry = readdir($handle))) {
		if ($entry != "." && $entry != "..") {
			$isDirEmpty = false;
			break;
		}
	}
	closedir($handle);
	
	if (!$isDirEmpty) {
		$files = scandir($path);
		$files = array_diff($files, array('.', '..'));
		return '/banners/' . $files[array_rand($files)];
	}
	return '/static/blank.gif';
}

4. go to /templates/index.html, and change
<img class="board_image" src="{{ config.url_banner }}"

to
<img class="board_image" src="{{ random_banner_url() }}"

5. do the exact same thing in #4 for /templates/thread.html, /templates/generic_page.html, and /templates/themes/index/index.html
6. rebuild all boards/threads in mod.php and test new banner system

obviously you need to test this in a dev environment first, i did this on vichan but it looks like it's identical on lainchan. the only minor drawback is that the banner changes on each thread/index based on user actions (a new reply, thread, delete, mod action, etc.) instead of refreshing the browser due to twig's caching system, but because leftypol has high enough traffic this will not be a problem, it will change frequently enough and it's worth it for the improved page load times and minor bandwidth savings of frequent visitors not having to constantly re-download previously-seen banner images. also in theory this may reduce cpu usage a bit because the banners.php opcode is no longer executed each time any user refreshes his browser or goes to a different page, whereas this new twig function would execute only on user actions which are obviously far less frequent than refreshes / page loads. the other minor issue is it will ignore whatever you set $config['url_banner'] in instance-config.php, it will only pull images from a "/banners" folder if it exists, can't think of a way right now to have this twig function work together with that, you can put a TODO comment on this function to change it later, i don't think it's a real priority.

>>34889
> $isDirEmpty
If the directory is not empty, you call scandir on it. If the directory is empty, scandir would do no more work than your while loop. What is the purpose of prescanning the directory instead of testing whether the result of array_diff is empty?

> the other minor issue is it will ignore whatever you set $config['url_banner'] in instance-config.php, it will only pull images from a "/banners" folder if it exists, can't think of a way right now to have this twig function work together with that

The twig_* functions can take parameters from the calling templates. The templates can take parameters in their Element(template_source, array) invocations. The invokers of Element(template_source, array) will pass in config values for whichever openBoard call is in effect at the time. >>34761

>>34890
>>34889
function in step 3 is now:
function twig_random_banner_url($path) {
	if (substr($path, -1) !== "/") {
		$path = $path . '/';
	}
	$path_twig_relative = dirname(__DIR__, 5) . $path;

	if (!file_exists($path_twig_relative)) {
		return '/static/blank.gif';
	}

	$files = scandir($path_twig_relative);
	$files = array_diff($files, array('.', '..'));
	if ($files) {
		return $path . $files[array_rand($files)];
	}
	return '/static/blank.gif';
}

in step 4 & 5 it is now:
<img class="board_image" src="{{ random_banner_url(config.url_banner) }}"

and now there's a new step between 5 and 6:
5.5. in instance-config.php set $config['url_banner'] to "/banners/" or "/banners" (either will work)

A note about Anon's >>34891 updated code. While it will pick up the correct config.url_banner in single-board template calls, on the overboard index pages, which feature banners, it will pick up the config.url_banner of whichever board had the last thread in the $top_threads, because that board had the last openBoard call in buildOne.
https://git.leftypol.org/leftypol/leftypol/src/commit/631a5b5fc705252697734c74a69e9edffbd55bec/templates/themes/overboards/theme.php#L172

If this random pick by the last $top_threads item is not desired, config.url_banner can be remembered before the first buildOne call and sent into the index template separately in the Element invocation. >>34890
https://git.leftypol.org/leftypol/leftypol/src/commit/631a5b5fc705252697734c74a69e9edffbd55bec/templates/themes/overboards/theme.php#L204

This way the overboard index pages would use the config.url_banner setting from the global instance-config.php. On the other hand, the random pick of the banner folder by the last item in $top_threads might be considered a feature.

File: 1653781104387.png (130.7 KB, 1819x857, alt_is_dead.png)

Currenly overboards use the default theme of the board their last visible post is from. Perhaps this should be changed in the new overboard code, if it isn't already.

this commit for checking report length is incorrect it will give an error saying strlen is expecting a string not an array if someone bypasses the input maxlength set in html
https://github.com/towards-a-new-leftypol/leftypol_lainchan/commit/bb0b7007fd5e27bd29c76235cf7a1b8148995f99
if (strlen($report)

should be
if (strlen($_POST['reason'])

File: 1654145706733.png (679.45 KB, 1022x731, ClipboardImage.png)

Anyone know of an LGBT content blocker extension or something? I don't hate gays, I'm just sick and tired of all the retarded idpol "pride" shit slapped onto everything in the most nauseatingly liberal way, I can't avoid it even though I search for content not even tangentially related to gay stuff.


File: 1654993228127.png (755.51 KB, 1064x6307, flaglist-git.png)

Flag list for >>>/meta/20864. This version uses the git repo static/flags folder https://git.leftypol.org/leftypol/leftypol/src/commit/631a5b5fc705252697734c74a69e9edffbd55bec/static/flags which is out of sync with the live site and the hidden >>34728 >>34729 >>34735 instance-config.php, so it will not match the live post form. Adjust the 80px height in the img tag's style to taste. Rerun when a new flag shows up in the git repo.
$ cd leftypol/static/flags
$ { echo '<div style="text-align: justify">'; for f in $(ls | grep -e '[.]png$' | grep -ve '^flags[.]png$'); do echo '<span style="display: inline-block; border: 1px dashed; text-align: center">'; echo '<img style="height: 80px; image-rendering: crisp-edges" src="'$f'">'; echo '<br>'; echo '<span style="font-size: 20px">'${f%.png}'</span>'; echo '</span>'; done; echo '</div>'; } > test.html

File: 1654993342506.png (386.26 KB, 1064x2264, flaglist-live.png)

Flag list for >>>/meta/20864. This version uses the live post form. It has to use the live static/flags folder because the git repo is out of sync >>34897. Mobile app users get their flags through https://leftypol.org/status.php which automatically syncs https://git.leftypol.org/leftypol/leftypol/src/commit/631a5b5fc705252697734c74a69e9edffbd55bec/status.php#L55 with the live post form, so it will match this version. Adjust the 80px height in the img tag's style to taste. Rerun when a new flag shows up in the live post form.
$ { echo '<div style="text-align: justify">'; wget -q -O - 'https://leftypol.org/meta/res/20864.html' | grep -E -oe '<option value="[^"]+">[^<]+</option>' | sed -r -e 's#^<option value="([^"]+)">([^<]+)</option>#<span style="display: inline-block; border: 1px dashed; text-align: center"><img style="height: 80px; image-rendering: crisp-edges" src="https://leftypol.org/static/flags/\1.png"><br><span style="font-size: 20px">\2</span><br><span style="font-size: 20px">\1</span></span>#'; echo '</div>'; } > test.html

I get 404s for images on /hobby/, /games/, /draw/, /anime/, /edu/, /music/, /AKM/, /meta/, /dead/ and /gulag/ when using the onion service.

>>34899
Image posting is temporarily turned off for everyone so that's expected

https://leftypol.org/search.php?search=Grace&board=siberia
1. Why doesn't this find anything at all?
2. Why do I have to select /siberia/ again in the search form?

File: 1655221706870.png (1.09 MB, 1080x1080, ClipboardImage.png)

Did the mods disable clipboard images for /siberia/? It works on the other boards, but not siberia (pic rel is an example)

>>34902
works on my machine

File: 1655224315297.png (357.75 KB, 690x506, ClipboardImage.png)

>>34903
It's not on mine, Tor didn't let me use it on /siberia/ either, pic rel is attempt 2 that failed. Like I CTRL+V it and tried Right-click+Paste but it just doesn't appear in the files. Neither does uploading images for that matter.

About >>34901
> 2. Why do I have to select /siberia/ again in the search form?

The board parameter sent from search.php to search_form.html is called 'board':
https://git.leftypol.org/leftypol/leftypol/src/commit/631a5b5fc705252697734c74a69e9edffbd55bec/search.php#L18
> $body = Element('search_form.html', Array('boards' => $boards, 'board' => isset($_GET['board']) ? $_GET['board'] : false, 'search' => isset($_GET['search']) ? str_replace('"', '&quot;', utf8tohtml($_GET['search'])) : false));

But search_form.html tests for equality with 'b':
https://git.leftypol.org/leftypol/leftypol/src/commit/631a5b5fc705252697734c74a69e9edffbd55bec/templates/search_form.html#L10
{% for b2 in boards %}
    {% if b2 == b %}
    <option value="{{ b2 }}" selected>/{{ b2 }}/</option>
    {% else %}
    <option value="{{ b2 }}">/{{ b2 }}/</option>
    {% endif %}
{% endfor %}

If either the board parameter sent from search.php to search_form.html is renamed to 'b', or the equality test is switched to 'board', the search form should pick up the correct board as its initial selection.


>>34906
Maybe the global $board interferes with the twig template, although I can't see why it would, and we should just switch both the loop variable equality test target and the Element parameter to searchboard.

> Benjamin

This is the same Southall guy who adds parens around &&, which took precedence anyway, instead of >>>/leftypol_archive/1691 around the || chain:
https://git.leftypol.org/leftypol/leftypol/commit/1792bf48eec755ee9a07aa5bef5fbf1e27d406c4

>>34907
It's Appleman1234 of Lainchan fame.

I would just revert b89fe3046bfbc0d7db8e7e8773e92c0536417450.

The report function doesn't seem to be working on /leftypol/.
The /leftypol/ thread "Why is /pol/and so fucking right-wing?" Is overrun by /pol/yp raiders and constantly derailed. Mods don't react to reports. Could you please look into it and clean up?

>>34909
I know it fails on posts that have already been deleted (a refresh will show if that's the case), is this a different issue?


Bug report:
When you have set another theme from the default, the Rules and FAQ pages look atrocious / almost unreadable


>>34913
Dark Bunker Red, which is one of the very few dark themes with good contrast between the text v background, so please don't change anything else with it, it saved my eyes on here

You idiots do realize that Cloudflare is who shut down 8ch, right? Don't you think it'd be smarter to pick a different DDoS "protection" service?

>>34915
In general, complaining about something isn't really useful. If you're going to complain about something, it helps to have a plan to fix it, at least. Even better if you're willing to commit the work required to make it happen.


> the Rules and FAQ pages look atrocious / almost unreadable >>34912
> Dark Bunker Red >>34914
The relevant property of dark_bunker_red.css is that it lacks ban class styling. >>34913
https://git.leftypol.org/leftypol/leftypol/src/commit/858a501b1f652831feafd9b51c6f06c3b92e30a0/stylesheets/dark_bunker_red.css
The default dark_red.css has three div.ban sections.
https://git.leftypol.org/leftypol/leftypol/src/commit/858a501b1f652831feafd9b51c6f06c3b92e30a0/stylesheets/dark_red.css#L157

To fix add div.ban { … } and div.ban h2 { … } sections to Dev Tools → Style Editor → New Stylesheet while on the Dark Bunker Red theme, adjust the foreground and background colors as well as any other desired properties until the faq and rules pages are no longer "atrocious / almost unreadable", then once satisfied post the changes for inclusion into dark_bunker_red.css.
https://developer.mozilla.org/en-US/docs/Web/CSS/color#syntax


I just realized that this site is literally fully fucking functional without using JavaScript.

I want to give the devs a french kiss right now. A commie imageboard run by unpaid volunteers handles JavaScript better than most Fortune 500 websites.

>>34920
I thought all imageboards are fully functional without JS unless they add crap like recaptcha.

>>34921
I admittedly only really use 4chan so I can't speak for others, but with 4chan the catalog, posting (as you pointed out with the captcha part), and many other smaller little things don't work without JS. You can still browse and read but it's a much less pleasant experience than /leftypol/.

Why does the site now load when clicking >> links between posts in a thread? It's pretty annoying tbh

… U+2026 Po HORIZONTAL ELLIPSIS >>>/meta/22513 &hellip;

space >>34917
no space >>34917…

Happens here:
https://git.leftypol.org/leftypol/leftypol/src/commit/858a501b1f652831feafd9b51c6f06c3b92e30a0/inc/config.php#L557
// Automatically convert things like "..." to Unicode characters ("…").
$config['auto_unicode'] = true;

https://git.leftypol.org/leftypol/leftypol/src/commit/858a501b1f652831feafd9b51c6f06c3b92e30a0/inc/functions.php#L2076
if ($config['auto_unicode']) {
    $body = unicodify($body);

https://git.leftypol.org/leftypol/leftypol/src/commit/858a501b1f652831feafd9b51c6f06c3b92e30a0/inc/functions.php#L1976
function unicodify($body) {
    $body = str_replace('...', '&hellip;', $body);


Cite markup:
https://git.leftypol.org/leftypol/leftypol/src/commit/858a501b1f652831feafd9b51c6f06c3b92e30a0/inc/functions.php#L2089
https://git.leftypol.org/leftypol/leftypol/src/commit/858a501b1f652831feafd9b51c6f06c3b92e30a0/inc/functions.php#L2136
> ((?=[\s,.:)?!])|$)

To fix add the ampersand to the character class.
< ((?=[\s,.:)?!&])|$)

>>34924
You broke my ascii :(
>>>/leftypol/1178093

File: 1663541209002.jpg (366.99 KB, 1392x2048, nitter.jpg)

User JS snippet for twitter → nitter conversion >>>/meta/22665
Array.from (document.querySelectorAll ('a[href^="https://twitter.com/"]')).forEach (e => { e.outerHTML = e.outerHTML + ' <a target="_blank" href="' + e.getAttribute ("href").replace (/^https:\/\/twitter\.com\//, "https://nitter.net/") + '">[nitter]</a>'; })

test link: >>>/meta/22666

Should there be an option to see "other pages" of posts? There are topics that seem to be visible only through enabling the catalog, but without that you can only see the newest posts on a single "page" of the standard UI. This is in contrast to some other imageboards (notably 4chan, among others) where you can select page 2, 3 etc.. displaying posts without having to go to the catalog display.

Is it intended functionality to not have that feature here (and a few other boards that seem to be on a similar vichan codebase like lain )? Or is there some strangeness going on on my browser's end, possibly because of addons or the like? Thanks.

File: 1665034717185.png (10.81 KB, 967x46, ClipboardImage.png)

>>34927
(Sorry for late reply, I've been away from /tech/)
Looks like it's a local thing if you're not seeing the page list at the bottom of the board index.

>>34926
Has anyone asked you if you want to be part of the dev team yet? We've been pretty slow for a couple of months due to other obligations.

can't report cp spam from /alt/

Onion link asking me for a login? Then if I don't just saying "Authentication required"

> Failed to resize image! Details: gm convert: iCCP: cHRM chunk does not match sRGB (/tmp/phpxeccyD).
When posting this: https://upload.wikimedia.org/wikipedia/commons/0/0b/Romance_languages.png

Dear tech team,
Can you guys make it possible to attach .mobi files?
Thanks

Can .webm’s finally be uploaded on the site?

Last time I tried that it didn’t work, so I had to convert it to a .png instead.

>>34933
Do you mean .webp?

>>34934
NTA but probably.

Also IMO .webp is shit

OGG support when

Hey could we add .jxl support? It's supported by default on librewolf, and I think the only reason chrome is holding off on it is because it competes with .webp, but chrome still supports it via about:flags.

We could make some absurdly storage efficient memes with it, like sub-kilobyte file sizes, and even double digit byte sizes.
https://jpegxl.info/art/

>>34937
you're not going to get that kind of performance with general image compression usage. while neat the kind of features on display here scream "difficult to parse" and therefore "security/DoS risk". fun that inercia ran a jxl compo tho

>>34933
>>34937
I'm not sure it's a good idea to at the moment.
The reason we only added webp for thumbnails is because all the common-enough browsers and forks worked fine. Only issue was apparently one guy whose browser version did support it but his setup was broken. We didn't add support for uploading them, because they're still considered an annoying non-default format on many operating systems. Well, unless that's changed in the past year. I haven't kept up with formats/compatibility for a while so I'm open to counterpoints.
Until .jxl and av1 formats get more mainstream support, I don't think it's wise to allow either of them to be uploaded. Especially if Chrome doesn't support them (out of the box). The average griller user shouldn't be expected to dig into their most-common-in-the-world browser just to make images show up.

>>34936
I don't see why not. I'll try and add this when I get home.


File: 1673855642798.png (724.33 KB, 2048x2048, e007.315574.png)

>>34938
also for those who can't see the images there are converted version on demozoo: https://demozoo.org/parties/4406/#competition_17507

>>34940
noice

Heads up for codemonkey and admin vols
https://youtu.be/eUPJ9zFV5IE
Matrix 2.0 go vroom

>>34940
Let the music be free

Could we have some means of adding alt-text to images? Perhaps a tick next to the spoiler tick to preserve the description part of the metadata, and use that to give images alt-text?

Interesting This vid is filtered from the Deutsche thread why?

Even trying to link >>>/leftypol/1386982 in thread fails

>>34946
I can tell you it has nothing to do with the german thread. No one cares about that thread, not even me.

When posts are merged into another thread the links still point to the previous one.

File: 1682686544099.mp4 (230.69 KB, 600x600, ae048e96bf45e9cc.mp4)

The RSS feed for the overboard seems to be broken, all the links point to /leftypol/, even if they're on other boards like /siberia/. So 404 since there's no threads on /leftypol/ with that number.
https://leftypol.org/overboard/index.rss

Works fine for board specific feeds tho, just the overboards are having this issue.

>>34949
>the board supports RSS
how did I not know this? this is amazing



File: 1683536733614.png (7.46 KB, 128x128, Feed-icon.png)

to add to the RSS thing, there should be appropriate <meta> tags to allow RSS readers to automagically find the feeds. this is perhaps more an issue to bring up upstream. also an RSS icon somewhere would be nice, but again this also probably belongs upstream

>>34953
finally, I see that the feeds list threads in the order they were created rather than bump order. it might be nice if there were feeds for the latter, so that threads with new posts are shown as new

Devs this guy was making a tool for hashing spam and comparing across sites or something. You should check it out:
>>17472

random question, do we have enough ban evading that doing browser fingerprinting to try to catch them automatically would be valuable ?

>>34956
JESUS FUCKING CHRIST. WHAT THE FUCK IS WRONG WITH YOU PEOPLE??? WHEN WILL IT BE ENOUGH FUCKING SURVEILLANCE, AND SECRET LISTS, AND POST HISTORIES. FUCKING BROWSER FINGERPRINTING???

an IP + browser fingerprint gets you someone's identity. I hope anons here are switching user agents and/or using VPN/TOR.

>>34956
it would be easily evaded, plus privacy invasion like fingerprinting would decimate the remaining userbase.

>>34939
Given chrome is starting to lose a lot of users over the Web Environmente integrity and Manifest 3 thing, I'm wondering how complex the process of adding .jxl would be. Like would it just be adding it to a list? The only Firefox I can think of that doesn't have the config rn is vanilla stable, which is huge, but many forks just enable it be default now, so things are looking good on that front.

>get jumpscared by the realization that this site use cloudflare
>about to make a post about how cloudflare using reCapcha means they'll soon have WEI DRM.
>get back inside to make the post
>click the lock icon to make sure
>Let's Encrypt
Huh, guess we'll be fine then. Or does the site use both somehow?

File: 1690705377197.png (834.53 KB, 1074x953, DirtyGato.png)

>>34956
Newcutie

>>34960
cloudflare is for DDoS protection and redundancy. why they would choose a host with cloudflare is beyond me.

>>34960
leftypol.org does use Cloudflare, check the HTTP headers returned
>server: cloudflare
>cf-cache-status: …
>report-to: …
also see https://developers.cloudflare.com/ssl/reference/certificate-authorities/#universal-ssl and https://developers.cloudflare.com/ssl/edge-certificates/universal-ssl/
>By default, Cloudflare issues — and renews — free, unshared, publicly trusted SSL certificates to all domains added to and activated on Cloudflare.
>Universal certificates issued by Let’s Encrypt or Google Trust Services have a 90 day validity period.
this means that Cloudflare is MITM-ing everything you do here, you should use the Onion Service which ofc doesn't use Cloudflare

>>34963
>the Onion Service which ofc doesn't use Cloudflare
Was it removed at some point. I remember getting cloudflared on the onion during a /pol/ raid two years ago.

>>34492
Say /tech/ dev team, would it possible for the site to be able to run flash? I know that browsers do not support it any more and its "outdated" and shit, but a lot of older materials are primarily .swf files which I can neither upload, nor open functionally on the site which is unfortunate given the myriad of old school content flash files may have.

I honestly loathe cloudflare because it makes the site slow as fuck, and makes using it on low wifi or in poor areas very hard, since it loads forever, then the captcha doesn't read. It's like 2010s 8chan post captcha all over again.

File: 1693529748732.png (423.37 KB, 408x612, Missing Post.png)

Not sure if this is a mod question or a /tech/ question so I'm reposting it in both
Say mods, why are so many of the image files and video files in >>>/leftypol_archive/ and dead or gone? Like they're not deleted by mods, they just no longer exist. There's so many .webms that are non functional it's not even funny and the number of threads missing all of the images in them is annoying as hell. It's Desuarchive's filedeaths all over again.

Just as an example https://leftypol.org/leftypol_archive/res/489758.html has all images dead. Why and how? Or the /edu/ checkpoint thread
https://leftypol.org/leftypol_archive/res/580500.html

has yt-dlp been replaced?
Why do I get "[download] Got error: HTTP Error 403: Forbidden. Retrying fragment 01 (1/10)…" all the time for youtube videos now?

>>34968
This is for technical issues with leftypol.org, for your question try >>1280 or maybe >>18877. By the way, it works on my machine.

>>34969
Sorry, thought I was in the QTDDTOT

>>34967
Hello?

isn't /sfw/ just supposed to filter spoilered threads? /siberia/ doesn't seem to be showing up at all on there.

>>34972
/sfw/ lists all the safe-for-work boards, which afaik is all boards except /siberia/

archive.is is down for me with this nginx garbage replacing it in all browsers except Tor. Can someone give me an assist here?

Keep getting errors when I try to post only for the post to post just fine after refreshing the page, even though I opened te page like a minute before posting. I can't even tell what the objective problem is

>>34975
I think I know what you're talking about. Sometimes it happens. Unfortunately, debugging that would be a pain in the ass and unlikely to produce anything of value. Are you using a VPN? If so, try clearing your cookies and switching IP.

So is there a reason why I can't embed certian youtube links? like for example I cant embed this

https://youtu.be/nbafT2w0cCQ?si=U42ECuZj_eus4Z82

But I can embed this one

https://www.youtube.com/watch?v=nbafT2w0cCQ

But they both go and go to the same video, this first one I coped off of YouTube's share feature and the second one I just directly copied from the browser.

File: 1699941873723-1.png (1.08 MB, 1584x983, effe.png)


>>34977
I can't answer this but the ?si=U42ECuZj_eus4Z82 part is used for tracking, you should always remove it. Ideally the software still should accept it, idk why it won't.

>>34977
Vichan uses a regex string for processing it, in a rush right now so can't find it in the repo for you, but it will only accept a certain list of YouTube URL formats. It's shitware, through and through.

Can you stop banning Tor users because of some chinlet derailing the thread? Holy macaronie.

I'm spending too much time on other sus tech chans because they seem to have tech nuggets
closer to my level. Something like a left /g/ clone should exist imo. btw, lurking obsessively and posting occasionally here for a year on /leftypol/ crystalized and reinforced my politics to the point of activity the last couple of months. o7.

>>34982
>Something like a left /g/ clone should exist imo.
You could always host a picochan instance over tor. It's dead simple and appropriate for the type of poster.

Onionsite Not Found

Details: 0xF0 — The requested onion service descriptor can't be found on the hashring and therefore the service is not reachable by the client.

>>34984
Works 4 me. This was posted through onion.

>>34966
>not using the onion site
Why are you on the Internet?

>>34986
Anon, the tor network is still part of the internet, it's not a seperate thing.

>>34987
Yes but it's clear anon doesn't use the Tor Browser. And onion mirrors mix up all the traffic, increase the length of a circuit and protect you from your Tor node getting permabanned so not using onion mirrors when they're available is just weird.

File: 1705188224154.png (92.01 KB, 887x736, ClipboardImage.png)

the booru certificate has expired

the overboard catalog isnt updating?

>>34982
Glad to hear. I hope you post more on tech then. Spread the word about leftypol.
>>34989
Booru is its own website. You can reach the staff by their forum. They're slow to respond though, like a few weeks sometimes.
>>34990
Maybe a hiccup, saw this post on the overboard.

File: 1706308522572.png (456.38 KB, 1597x761, ClipboardImage.png)

>>34991
/overboard/ works as it should but /overboard/catalog isn't updating for me. tried on several devices
same with the sfw and alt catalog
the catalogs for the individual boards work like normal
pic is what the overboard catalog looks like for me

Why can't Tor users post images anymore? It doesn't really stop spammers or reactionaries from posting here. I don't get the logic behind it much. It's not a good solution to spam or troublemakers but it also affects the users who dindu nuffin.

>>34993
I'm a tor user and down with it if it slows a torrent of shit. Yeah, it's a pain not being able to attach files sometimes.

The RSS feeds using relative links seems to break certain browser-based RSS readers, namely fraidycat. It tries to go to that link relative to the page the link is on.

It was brought to my attention that https://boards.plus4chan.org/baw/ was having a Red Alert Day for April Fools and it was rather well done with musical theme an interactive musical background with the Red Alert Theme and moving Zepplins, and different Red Alert cut-scene video clips when you clicked Reply.
I was thinking it would be fucking metal as hell if the dev team took a look at this, maybe replicate it. We're leftypol and honestly the whole Red Alert aesthetic would be fun to have as a CSS option.

File: 1713048463374.jpg (5.84 KB, 250x188, Keesha_fim01.jpg)

What's with the new "Uploading files in incognito mode is not allowed." in some browsers?
I just want to shitpost and upload funny images. What are they up to now?

File: 1713056032877.jpg (2.38 MB, 3320x2236, Assad checkem.jpg)

>>34997
>4444
>Quad 4s
Checked!

>>34997
If you use incognito mode you give the website less valuable data.

>>34999
That's the point yes, doesn't answer their question tho

Anyone have advice for converting .swf to mp4 or webm? I have 2 swf files that obstinately fail to convert because of a frame error.

For example these files
https://files.catbox.moe/f5ueyb.swf
https://files.catbox.moe/fc1w1v.swf

>>35001
I suppose you already tried ffmpeg?

>>35001
use gnash and a screen recorder

>>35003
>>35002
I'll give these a shot, didn't know about them thanks.

>>34492
>>35002
Also Zankaria, as the most active Dev-Mod can you please take a look at >>>/meta/31895
Thank you very kindly.

>>35005
I am already on it and off it.
I have my hands quite full, and that slipped in the lower priority list.
With that said I finally managed to deploy a feature that had been stuck in a limbo for the past month

>>34492
the top bar on dark bunker is the wrong color now, pls nerf

>>35007
It also seems to disappear after posting??

File: 1714402987593.png (187.29 KB, 1137x944, SpamOnGit.png)

wtf was this? and they did it twice. is this hindi? lorem impsum?

>>35009
Spam. Unfortunately Gitea really lacks good moderation tools.
I was thinking of turning off registrations, but I have no channel set up to accept legit newcomers

I'm having a weird issue where the top bar just disappears at times if I scroll up or down, and threads randomly require a refresh even if I just opened them a minute before.

>>35010
Mate, if you need any help figuring out the backup system or anything else, need credentials for gitea or whatever let pask know and he'll tell me.

Cheers.

>>35011
You have have the "Unpin the top and bottom bars" option checked

>>35013
I don't have that checked but they keep disappearing.

>>35014
>>35014
>they keep disappearing.
same for me, for the last week or so. even after a browser reinstall.

>>35014
>>35015
What browser/device are you on? So far I was only able to accidentay "reproduce" it on mobile, and even the sporiadically

>>35016
not them but in my case it's Firefox/PC and they appear to disappear after I make a reply and re-appear if I F5 the thread.

Zankaria, i'd ask on the matrix bu wanted to post the question in a public forum. what're ur thoughts on autocompletin the password box to "password"? me personally, sometimes i make a post bu its retarded and i wanna delete it bu i make it so fast i foget to put a password. i feel like autocompletin it to password could be helpful in cleanin up threads w/out jannies, no?

hey jannies you should add in something when the 90 line limit error message gets recieved that says what your current line count is, it'd make trimming down posts to fit a lot easier.

>>35009
Indonesian I'm guessing

>>35017
test reply

>>35017
test from anonymous session

>>35017
Ok, for whatever reason it seems like making a reply triggers the JavaScript, which makes it insert the
position: initial
CSS
https://git.leftypol.org/leftypol/leftypol/issues/133#issuecomment-686

>>35018
That's weird. It always autocompleted with a password for me, even when I created an anonymous session
> what're ur thoughts on autocompletin the password box to "password"
You're asking to use "password" as a default password for all posts?

>>35024
ok now it sounds dumb when i say it outloud lol, mb. but what about a string of four or less character words, i.e. dogcatbear, idk. just that aint nobody can remember the series of letters and numbers we got rn.

>>35023
It's not just replying, if I scroll the overboard and it needs to load new posts, the top and bottom bars disappear.

File: 1714897795028.jpg (128.82 KB, 852x1008, 1621780775019.jpg)

>>35023
What if you change https://git.leftypol.org/leftypol/leftypol/src/branch/config/js/hud-pinning.js#L45 to
	setHudPinning(localStorage.hud_pinning !== 'false');

In my case `localStorage.hud_pinning' is undefined, this makes the check produce "true" as it should. With the current code I get false. I guess the alternative is to initialize `localStorage.hud_pinning' to true on first running the JavaScript. But I like this better.

>>35025
It might be a good idea to open a feature request upstream github.com/vichan-devel/vichan/

>>35027
Good point. Thank you


File: 1715419365546.png (326.37 KB, 792x720, a-bit-closer-to-heaven.png)

>>35030
>tfw I made the website a little bit better

Is the Onion being choked? It's been unusably slow the last 3 days.

>>35032
Massive bot spam storm in the last week

>>35033
Zankaria you're the only mod that seems to feel any responsibility about this. The tor node is being choked. Somebody with access is fucking with it. Could you investigate and post back here?

>>35034
Chocked as? I can't do much to filter our bots from Tor, which is already slow by itself

That aside, is anyone else here trouble with cloning our repos? I've been trying to onboard a couple of new devs, but they're both unable to clone https://git.leftypol.org/leftypol/leftypol/ or their own forks, failing with 403.
The thing is that I can't even reproduce on any of my machines

File: 1716836489603.png (29.55 KB, 200x193, works-on-my-machine.png)

>>35036
$ git clone https://git.leftypol.org/leftypol/leftypol.git
Cloning into 'leftypol'...
remote: Enumerating objects: 30285, done.
remote: Counting objects: 100% (30285/30285), done.
remote: Compressing objects: 100% (11354/11354), done.
remote: Total 30285 (delta 18415), reused 30263 (delta 18395)
Receiving objects: 100% (30285/30285), 138.73 MiB | 5.20 MiB/s, done.
Resolving deltas: 100% (18415/18415), done.

File: 1716861280375.png (125.93 KB, 474x316, ClipboardImage.png)

Oi Zankaria, when you have the time soon, please repair the archives >>>/meta/33396

Thanks

>>35035
>>35035
>Chocked as?
Choked as in pics and vids were loading at 10Kb/s. I posted that on sat but since sunday it's been much better, like almost back to normal 150Kb/s. Other onion sites were fine. Appreciate the reply btw.

Zankaria the stupid Ban Appeal system is broken.

>>35040
Can confirm.

Got the same when I responded with
ok retard to whatever illiterate idiot banned me.

Somebody fetch that mod their smelling salts.

>>35039
It's back to being painfully slow. It took 15 minutes to load this thread.

>>35042
>It's back to being painfully slow
Same, around the same time you posted. Have mods confirmed that it's not something on their side slowing the node? It's a usable speed now btw.

>>35037
Having reproducible issues is too much to ask these days
>>35038
> when you have the time
picrel
>>35040
I should have fixed it
>>35043
Not even sure what to check tbh. We have a daemon that does it's proxy thing and that's basically it.

File: 1718567898089.jpg (304.91 KB, 1383x1600, Atlas fugged.jpg)

>>35044
What's happened to the "watch thread" option, is it just me, or have you removed the feature? It's been like this since Friday I think? Scrolling through threads to find where I left off sux balls…

>>35045
No, I guess it broke during the updates…


File: 1718581850801.gif (3.91 MB, 270x263, Clown Suicide.gif)

>>35046
>No, I guess it broke during the updates…
Okay thanks, thought I was losing my mind… Also fuck!


Are RSS for boards not working correctly for anyone else?

I'm attempting to feed these two URLs into newsboat:
https://leftypol.org/leftypol/index.rss
https://leftypol.org/tech/index.rss

But neither of them populate in the reader. Am I missing something?


>>35050
Works on my reader (Flym)

>https://git.leftypol.org/explore/repos
<https://docs.gitea.com/usage/blocking-user
In light of the recent bot swarm, what is the Dev team's thoughts on closing the Gitea register to stop the spam of bots? Instead perhaps we could allow approved users to make an account.

When are you gonna fix the pdf uploading system!? How can I upload documents and have them look like file rel when uploaded?

When I find out why it's broken

(repost)
Btw Zankaria, there is something wrong with the way IPs/hashes are assigned to posts. Because unless all of you are using the same VPN/Tor node. I shouldn't be seeing (you)s next to the names of random posters and mods

>>35056
this was a cloudflare header problem which was fixed. Thanks

Smart move bringing this thread over here. Checking two boards was a pain.

It's a small thing but I think the report reason char limit is a lot lower than before.

>>35090
>It's a small thing but I think the report reason char limit is a lot lower than before.
Upped

>>35056
yeah I dont use either vpn or tor and see (you) that arent me

overboard catalog broken for mods

>>35347
Fixed

File: 1726716910524.png (22.82 KB, 288x499, ClipboardImage.png)

>removes ISO-8601
>DD-MM-YY

>>35466
We voted and most staff preferred mmddyy

>>35467
I mean ddmmyy.

Year first is clumsy and unsuited for everyday purposes… In my opinion.

I know it's a small thing but please increase report charlimit, at least to it's previous size.

any progress on the wrong (you)?

>>35481
that was already fixed, clear your browser cache

Why is the tor node still down?

>>35489
Because tor is complicated to configure

>>35489
…it has been up for the past two days

>>35480
Already did, to 512

>>35491
Is there a new address? It's not working for me.


I can't anymore click the text on the catalog to preview thread op without opening it

>>35503
gratitude

Mods the retards in ISG are feeding the Trump troll again.

>>35509
>Mods the retards in ISG are feeding the Trump troll again.
Meant USApol but same difference.

How do you follow threads on this board?

Cytube is back! https://tv.leftypol.org/

>>35763
\o/
danke

>>35548
seriously, is thread following broken or am I just stupid?

>>35796
Thread watching has been broken for a few months now, at least since June based on a comment from this thread

Every few minutes, my screen randomly jumps all the way to the top of the page. Anyone else getting this?
Might be due to Tor captcha if no-one else sees this.

>>35830
im not seeing it personally but i do have another complaint, the 'go to bottom' button doesn't work on mobile (safari).

>>35804
Should have been fixed now
>>35830
Noted
>>35831
(Sadly) known heisenbug. It appears and disappears randomly, and no dev team member with iOS has been able to reproduce it. I deployed an fix attempt but I am not sure if it's effective

Go to bottom started working for me again just today. Broke a few weeks ago but started working after the server failure only to break again a few days later. But now it is working again.

Also some random posts which are not mine have (You) on them now.

>>35834
It means that before the outage you made posts with those ids and the js associated those ids with you on your browser. The only fix is to clear all yous in the options menu

>>35832
>Should have been fixed now
thx

>>35839
Okay, thanks! And thanks for fixing Go to bottom. It was driving me crazy.

>>35467
Sometimes you have to do the right thing instead of the popular thing. Bring back YYYY-MM-DD.

>>35905
I agree but the rest of staff was against it

Mate, I think there's something wrong with the cache settings on media. Just a suspicion. I can't investigate at the moment. 2 busy 4 this.
Sorry!

Why am I seeing random posts with the (You) tag after the name despite me not writing them? Kind of unnerving tbqh. It has been this way every since the recent shutdown.


Does anyone here use the gallery mode? Can I remove it?

>>36033
I don't even know what that is.

Filters not working on overboard (possibly not even on board index idk). Is there an easy workaround for this?

>>36065
Now you never will
>>36037
Filters on the overboard do not work because they were never implemented. Right now the only workaround is to use some user-supplied JS. You can check the [Options] button for the textfield to load the javascript in.


I'm blocking Youtube and a post with a Youtube embed displays nothing to me. So for people who don't block Youtube, any thread with Youtube thumbnails connects their IP to Youtube, even if they don't click on anything in the thread and have Javascript disabled, because Youtube is hosting the thumbnail, is this correct?

>>36084
Yes. Right now we don't download the thumbnails because I am not sure if vichan is able to track their lifetime.

Some flags do not work. For example the "Sabo Tabby" option doesn't show any picture. All of the anarcho flags do not work as well.

>>36216
What web-browser are you using? I see it fine on my end (Firefox).

bump for uncycle / unsticky

The tor verification on the main board is broke again

>>36312
Test post

Test post again

Regarding the tor issues
The good news is that I found out the cause
The bad news is that I am still working on a fix/workaround

Fix deployed

>>36335
Will you have sex with me?


>You look like a bot

>>36344
Not here if you can post. So where?

crossposted from >>>/meta/35453
Proposition for increasing legibility and reducing whitespace:
div.body {
text-indent: .25em each-line hanging;
}

This would make paragraphs easier to tell apart without needing an additional line break, and would only effect lines long enough to wrap.

Additionally, for the Jungle theme:
span.orangeQuote {
    color: #FF8C00;
    text-shadow:  0.05em  0.05em orange;
}
.quote {
  color: #789922;
  text-shadow:  0.05em 0.05em green;
}

This makes the green and orange pop from the banana background.

>>36353
Noted

File: 1730311122261.jpg (Spoiler Image,16.64 KB, 474x326, leftypol-2024.jpg)

Mods,
Have or are any of you using the Tor Browser and the onion service? I.e. are you testing your "solutions" before you launch them?
Rhetorical question.
>Want to post
>Type full text out, fill everything out before hand, have a copy-paste saved, attached file, dropped kids off, filed tax returns, raise negotiated. Finally, it's time to solve the leftypol captcha.
>Solve it, ok browser froze, guess this is to be expected at this point
>Post reply. "Error". Damn, I guess the two-headed bird constituted as a single animal. Guess I'll have to solve it again.
>Another puzzle, okay. 57 second load time (no browser freeze this time!) Great. Oh seems like I missed a comma there on the last paragraph…
>Oh look the captcha expired.
Why do you hate anonymous posters?

>>36365
kek welcome to the kafkaesque purgatory of the tor poster. It all started when we were forced to wear the star.

>>36365
>>36366
I think I'm one of the only mods who uses the onion service. Shit definitely sucks, but some form of moderation is definitely necessary, since we've been getting a bombpartment of raids this month alone from the TOR node. I personally like the idea of >>>/meta/36319. TL;DR during times of raids, it puts each TOR post on a waitlist, and Mods either approve/deny Papers Please style. But as Zankaria notes, the development team already has a shitton of problems piling up, and creating this feature would involve a whole revamp of the vichan. I'll try to work on the patch, but if you can find any good wailist .php files those could be dope.

>>36365
Occasionally I do use, and so far I squashed all the bugs I found
>Post reply. "Error". Damn, I guess the two-headed bird constituted as a single animal.
Which error? You mean "you seem to have mistyped the captcha"?
>Oh look the captcha expired.
I'll see if I can alter the timeout

>>36353
Deployed the jungle theme changes.
The indentation is being discussed with staff

I'm trying to join the "Matrix Congress Chat" to ask a question, but Element keeps telling me that I'm not invited to the room.

>>36388
Please make a post in the waiting room and you will be invited.

please fix the fucking date format this shit is unreadable, it should be YYYY-MM-DD not whatever the fuck it is currently

>>36513
MM-YYYY-DD

>>36513
Staff had a vote about it and the current DD-MM-YY was the compromise that won

>>36520
Can't you add some javascript or something so that it looks like dd-mm-yy for mods but is actually readable for everyone else?

Some suggestion I have. Take it or leave it.

Sometimes, the images that you click on will fail to load and we know it's because of Cloudflare. So here's an idea. When the content fails to load, how about you make it so that a new tab or pop up shows up that brings up the cloudflare captcha for you to solve again and when you do it, it closes and then leftypol tries to request the content again? People will struggle to find out why some image or video isn't loading until they refresh the page.

>>36532
A toggle in the settings between dd-mm-yyyy and yyyy-mm-dd would be nice.

>>36593
>>36532
Ok I'll talk to the devs, but if they seem overwhelmed I'll try a crack at designing it.
>>36591
I don't really know what you're talking about, since I only use TOR to accsess the site and the videos for me are always fucked (can't have shit in Oniontown), but the reason for this is because under [Options] in the top right of the screen, and under the setting MediaProxy, its default configed to some weird onion link I never took the time to troubleshoot. Could this be the source of your issue?

Will the watchlist ever work?

>>36607
…it works on my end? What issue is it giving you?

File: 1731439473532.png (2.56 KB, 505x86, post.png)

The fuck is this shit

I can't post a thread on off-topic

>>36613
You now should be able to post. It's a new antispam feature requested by staff.
IPs are now required to have made at least one another post before creating a thread.

>>36614
NTA but can’t make threads despite posting (repeatedly)

>>36615
It says that your IP address only has this post that you made here in /meta/, but I take your word and imagine that our database is wrong. I imagine this is an issue with IPv6 vs IPv4, and our system's inability to label your IPv6 range as one entitity.

>>36615
>>36616
Yeah this guy is IPV6, we might have to see if we can tune the system to work on the /64 range for IPV6 IPs - it *should* cover the possibility of dynamic IPs since they are usually only dynamic on that range.

Perchance, anon, could you post some of your other posts so I can check the IP range?

Its doing it for me too

>>36615
>>36618
Yeah both of these guys are Comcast IPs, we'll probably need a range check for dynamic IPs. Fucking hate Comcast.

>>36619
I honestly want to get a cheaper internet service. Paying $100 for just ijnternet is lame

>>36617
Only ones I can think of right now are some of the /USApol/ threads:
>>>/leftypol/2027089
>>>/leftypol/2022471
>>>/leftypol/2021616
Some of them might have been over LTE, not 100% sure.

>>36622
Yes, these will do. Looks like /64 will work, at least for all Comcast IPs (hopefully). Now it's just the work of coding the bitch.

File: 1731488126098.png (60.6 KB, 300x100, 9.png)

Reposting this banner which seems to have gone missing with The Great Reset, maybe it can be squeezed back into the rotation.

>>36615
Added a workaround for IPv6 users


hey MODS, decrease flood timer, you have to wait like 2 minutes in between posts now, and it doesnt even help with raids because that comes from different ips anyway

>>36636
thats not cockshott, its mark milley. the banner you're thinking of is different

File: 1731586011168.png (3.59 KB, 496x81, ClipboardImage.png)

I'm getting this message every time I try to make a post, anyone knows why? I could yesterday

>>36660
Try now

>>36661
still doesn't work :/

>>36662
The error that you're now receiving, is it the same error that you originally had? >>36660


File: 1731647969622.png (86.8 KB, 1028x676, image.png)

random text shows up in the comment section whenever I load a page.

The "sort by" dropdown seems to be broken. Wanted to set it to random but it stays at bump order when set and doesn't cache the selected setting.

>>36688
Could not reproduce
>>36676
Noted

File: 1731803231508.jpeg (536.37 KB, 1290x2543, IMG_0836.jpeg)

>search "utilitarian" on /leftypol/ on a phone
>results don't fit page

did /edu/ swap with /siberia/ ?
if anything its a positive development, more need to read books

I don't know what happened recently but somewhere along the line videos shared keep giving "error" now when I try to play them through Tor Browser, this never happened before. Seems to happen in a majority of cases but not always.
Happens on >>>/leftypol/2041376 for example

For the love of matter replace the captcha with something less resource-intensive

>>36904
Couldn't reproduce this on my side. Also, you can also search through the site using your webbrowser: "[pattern] site:leftypol.org"
>>36986
I experience the same issue. I imagine it has to do with the media-proxy setting that the website sets for all TOR connections, tuberyps2pn6dor6h47brof3w2asmauahhk4ei42krugybzzzo55klad.onion. I actually have never tried to fix it kek, kinda just gave up on watching videos. But poking around through the site when I accsess it with javascript enabled, I found you can navigate to the "[Options]" bar, and at the bottom you can change the proxy you use.
>>36988
Do you have any alternatives in mind?


File: 1732232686601.png (58.92 KB, 925x488, ClipboardImage.png)

there seems toe be a problem at the log

>>36996
thats not a problem with the log. It just means the moderator reviewed a report and didn't find it worthy of taking an action so they dismissed it from the queue

>>36997
Take a closer look at the posts' numbers

>>36998
reports are handled from a big list, not in chronological order

File: 1732284420778.png (22.02 KB, 1054x196, ScreenshotForTheAnon.png)

>>36996
As >>37002 says, they are handled in a chronological order. I reported your post and dismissed the report, see picrel.
>>36994
As a TOR-user, I don't like the captcha either. Found this repository that's more or less the code they use: https://github.com/Gregwar/Captcha. I'll write a ticket for it on our repo and talk to Zank to see if they'd be okay with implenting it.

>>37003
Reading through our repo now. Looks like lainchan devs (to whom we kneel and bow before) already made a captcha, which is the one I imagine lainchain actually uses. My apologies.

File: 1732322619164.png (10.15 KB, 757x147, firefox_rSxKzPi3Vg.png)

Received pic rel when trying to post an mp3 (file size is 256 kb)

>>37012
Could you please upload the file as a zip so I can use it to reproduce the issue?

can you guys remove the flood detection shit. i havent posted anything in hours but for osme reason the site thinks im trying to spam
funny thing is when people are actually flooding they never get caught by the system

>>37021
Is this good? It's just a shitty little audio file but thanks for checking it out. I think my firefox might be set to some unknown privacy setting, could be the cause of this.

>>37023
Which flood system is giving you issues?

make tor comments invisible by default, and make users opt-in to view tor posts.

We currently have a problem with a raging anti-semite hiding behind a tor node and daring mods to ban it.

This seems to be a decent half-way solution.

>>37042
Stupid faggot.
make Anonymous comments invisible by default, and make users opt-in to view Anonymous posts.

Also kill yourself for having the most dogshit idea of the year.

>>36994
>>37003
>>37004
Any progress on replacing this nightmare of a captcha in use?

Trying to post an mp3 I get this error:
> Trying to access array offset on value of type bool in /var/www/lp-prod/post.php at line 1580

Sorry I did not see >>37012
It seems to happen with every mp3

test

>>37073
Ok that was really weird. Basically it seems like the thumbnail file got corrupted, and since it was in a folder that git doesn't track it never noticed the file being broken.
And with the file being broken, the code that was trying to calculate the width and height of the image failed.

>>37074
Thank you for the fix!!

>>37074
Hi dev, can you look at this >>37055 ?
It's a better captcha (the hCaptcha one is a resource hog and is very buggy on Tor Browser)

>>37151
https://gitlab.leftypol.org/leftypol/leftypol/-/issues/54#note_145
The lainchan one is just secureimage.
As for bus: which? The few times I used tor I haven't noticed anything that I haven't already fixed (or fixed in my tests?)

>>37155
Main trouble I'm thinking of other than the slowness is that, with middle security level, it throws up additional scripts you need to grant to finish the puzzle some of the time, which gives error/blank page and needing to f5 the page and redo entirely 50% of the time. Using websites with tor browser at lowest security slide is borderline retarded and hopefully not something should be incentivized (it would imply auto-accepting all scripts to be able to contribute to the left-wing extremist terrorist website)

>>37042
It takes 5 seconds to make a ublock filter.

>>37158
In addition they reset way too quick once you've gone through the pain of actually having this piece of shit hCaptcha complete

>>37178
>>37158
Makes it virtually impossible to post on the tor node unless you happen to get a very lucky or want to sit cycling for a long time.
It's ending torposting by the back door and only further proof to show the degradation of /leftypol/ in the last couple of years.

>you must post at least once before thread creation privilege
I've posted multiple times. what is going on?

Wordfilter "Zigger" to Zuyghur or Zyghur.

Why? Zigger normalizes the n-word, and is essentially just a way to call supporters of the Russian SMO the n-word. The term itself originates from the openly racist /pol/ board, for which Leftypol is supposed to br an alternative.

I understand that much of the moderation team is "anti-campist", but at least for your point of view you should care about optics and avoid trying to turn your support of NATO into an opportunity for only very-slightly-veiled racism.

>>37250
I take it you also support banning the Ukie = pigs comparison then?

>>37251
I'm calling for a wordfilter, that's all. Wordfiltering Ukronazi into UkroᴉuᴉlossnW or whatever is none of my concern.

>>37250
>yes janny moderate me harder

>>37253
Conversation quality has substantially fallen, to the extent that /leftypol/ is resembling a /pol2/ overflow board with more leftists.

The change being requested is a small aesthetic change; it won't stop "glow" "anti-campists" from posting, but it will make it slightly less obvious.

Because as is, we're experiencing a Gresham's Law of bad posting displacing good posting, as good posters leave (Gay Nazi, of all people, is one of the last quality posters here) and bad posters proliferate.

>>37254
wordfiltering zigger wont help, especially considering that it dosent get used as much except for a few anons that spam it every once in a while and get ignored

>>37255
It's not bannable, is creeping racism, and no one calls them out on it (that much). Just a small QoL change.

So, once again, should mods not wordfilter zigger? Come to think about it, why wordfilter the actual n-word? MAGAcom blah blah blah.

Putincuck, foreign agent, etc, all of that is fine, but the z-word is too close to the n-word.

What do actual African Americans think?

>>37291
>foreign agent
What's offensive about the word foreign agent?

>>37258
> and no one calls them out on it (that much).
It would be repetitive to keep calling them out on it. I've thought about calling them a cracker every time they do it, shitflinging isn't productive. Let them do it and expose themselves.

File: 1733267400372.png (827.25 KB, 900x563, ClipboardImage.png)

>>37294
>Let them do it and expose themselves.
I hope the message is clear to all non-Whites. If Russians can be lowered to the Mongoloid Zigger Orc hordes, how do you think these people feel about you?

Either you're team Zigger or your team Cracker. If you're not a cracker, they won't let you on the team, and if you're not a cracker, you're all the same to them whether you're Black Brown Yellow Green whatever.

>>37295
It's just easier to appropriate Zyghur than Zigger, mind you.

But you folks make a valid point about them alienating non-white non-burgers about how trying to set up a race war is suicidal.

>>37295
>the comic depicts all women to have clearly western phenotypes

There seems to be a misconfiguration with the word filters, such that the letters N, I, and K will trigger the uyghur filter.
- sputnik
- robotnik
- uyghe: goddess of victory
- ect…

>>37336
oh weird, it only triggered at 2 K's that time, I have seen it for robotnik on here tho.

>>37335
These people don't actually like non western women its just virtue signaling

Catalog sorting issues solved

>>37338
Define a non-Western phenotype. Hottentot (Khosan) have huge t&a, Japanese women have small or no breasts, etc…

The point might be more that the women are geared toward notions of male gynosexual attractiveness.

File: 1733559960736.png (3.14 KB, 350x57, dfgdfgghfdfgh.png)

will there ever be a new fucking math question in the thread creation menu I'm not being mentally stimulated enough

>>37344
Did someone save the marxist trivia quiz i made?

>>37344
Next time the pope dies

The word filter to turn two -'s into an em dash (—, U+2014) is messed up, turning it into an en dash (–, U+2013)

>>37413
oops I used the old thread


Unique IPs: 180

[Return][Go to top] [Catalog] | [Home][Post a Reply]
Delete Post [ ]
[ home / rules / faq ] [ overboard / sfw / alt ] [ leftypol / edu / siberia / latam / hobby / tech / games / anime / music / draw / AKM ] [ meta ] [ wiki / tv / tiktok / twitter / patreon ] [ GET / ref / marx / booru ]