Commit Graph

905 Commits

Author SHA1 Message Date
Andrew Dolgov fe5ada7250 set some annotations on Plugin hook methods 2021-11-13 20:07:13 +03:00
Andrew Dolgov 618e96b793 deal with some warnings in plugins/trgm,readability and base plugin class 2021-11-13 19:55:30 +03:00
Andrew Dolgov 03d0692268 no need to duplicate annotations 2021-11-13 19:52:47 +03:00
Andrew Dolgov 68d7cf44f9 phpstan: deal with plugins/share 2021-11-13 19:49:37 +03:00
wn_ 03495c11ed Address PHPStan warnings in 'classes/sanitizer.php'.
This also includes some minor tweaks to things that call 'Sanitizer::sanitize()'.
2021-11-11 19:59:25 +00:00
Andrew Dolgov 87a30d88d3 plugin cleanup re: phpstan 1.0 warnings 2021-11-10 20:58:40 +03:00
Andrew Dolgov 9f734c9050 minor phpstan tweaks 2021-10-22 13:49:08 +03:00
Andrew Dolgov 2a5c2be6cd af_redditimgur: allow subscribing to teddit.net subreddits directly (rewriting to reddit.com) 2021-10-22 13:25:43 +03:00
Andrew Dolgov 6fe0751038 af_redditimgur: set some @var hints 2021-10-22 12:33:55 +03:00
Andrew Dolgov dd30825b94 af_comics: pass PluginHost to filter constructors 2021-10-18 07:41:24 +03:00
Andrew Dolgov 2c931df77c remove SELF_USER_AGENT custom constant, replaced with configurable Config::HTTP_USER_AGENT / Config::get_user_agent() 2021-08-23 10:56:31 +03:00
Nils Gotzhein b6b6771d8d pull latest readability-php via composer 2021-08-17 22:18:46 +02:00
Andrew Dolgov 92c78beb90 apply usort workaround for readability-php because its authors were unable to do so for 3 months (https://github.com/andreskrey/readability.php/issues/99) 2021-05-28 14:42:14 +03:00
Andrew Dolgov d09a64d6f9 split googlereaderkeys plugin into separate repo 2021-05-21 13:30:56 +03:00
Andrew Dolgov 8574532b7f add hotkeys J/K to move between unread feeds 2021-05-20 20:32:00 +03:00
linkai 983655165e Fix:Plugins-share:init.php - site_url is NULL when share article by URL from archived 2021-05-12 09:46:52 +08:00
kdan 2ccf0e50a2 Merge branch 'master' into master 2021-05-11 11:05:20 +03:00
linkai acf0e0d266 Fix:Plugins-share:init.php - site_url is NULL when share article by URL from archived 2021-05-11 16:03:18 +08:00
Andrew Dolgov fea59de26b af_redditimgur: use core youtube vid helper 2021-05-07 07:42:24 +03:00
Andrew Dolgov 86300a0ca8 add urlhelper to extract youtube video id from url 2021-05-07 07:37:27 +03:00
linkai 0574675ed6 Fix:Plugins-share:init.php - site_url is NULL when share atircle by URL form archived 2021-04-26 12:17:29 +08:00
Andrew Dolgov e8f78181f1 af_redditimgur: instead of generating potentially blacklisted iframes (i.e. huge black boxes),
save found youtube videos as post enclosures for af_youtube_... plugins to deal with later, if enabled
2021-04-23 20:30:29 +03:00
Andrew Dolgov 5a71426ea5 youtube_embed: use embed-responsive 2021-04-21 18:47:49 +03:00
Andrew Dolgov 0acd33abe3 OTP: generate longer secrets, also make them easier to read/copy 2021-03-29 19:26:04 +03:00
Andrew Dolgov 68299c914b share: move og:image back to head 2021-03-21 09:35:43 +03:00
Andrew Dolgov a0ce7f556b nsfw: set cursor pointer 2021-03-15 19:42:48 +03:00
Andrew Dolgov 4ddcd54e8d * limit progressfunction debugging to size quota exceeded notifications
* af_redditimgur: reparent generated iframes outside of post table
2021-03-13 11:18:59 +03:00
Andrew Dolgov 52d1a5c96d gettextify previous 2021-03-12 09:35:56 +03:00
Andrew Dolgov 580eccd3da throttle login attempts, controlled by Config::AUTH_MIN_INTERVAL 2021-03-12 09:35:01 +03:00
Andrew Dolgov 96d89fe912 shorten_expanded: reduce log spam 2021-03-12 08:34:03 +03:00
Andrew Dolgov 4949e1a590 valid OTP code should not be enough to login, oops 2021-03-12 07:32:15 +03:00
Andrew Dolgov 146b1e0feb * shorten_expanded: use ResizeObserver (DUH)
* add HOOK_HEADLINES_RENDERED
2021-03-11 22:55:14 +03:00
Andrew Dolgov 6e0474a7c8 update zoom layout a bit 2021-03-11 22:08:40 +03:00
Andrew Dolgov 21e0b28cf1 nsfw plugin: we don't actually need any JS 2021-03-10 20:47:00 +03:00
Andrew Dolgov 5e738ec278 shorten stuff in af_zz_vidmute 2021-03-10 18:23:34 +03:00
Andrew Dolgov 353ee40378 shorten_expanded: remove loading=lazy on the js side instead 2021-03-10 17:51:06 +03:00
Andrew Dolgov 668b0ac7a6 shorten_expanded: no need to hook on HOOK_SANITIZE anymore 2021-03-10 16:34:27 +03:00
Andrew Dolgov 5bc47451e1 shorten_expanded: increase timeout 2021-03-10 15:08:36 +03:00
Andrew Dolgov 36ad46e60d * shorten_expanded: use promises instead of a timeout hack
* normalize some icon colors
2021-03-10 14:57:03 +03:00
Andrew Dolgov b1961163b8 af_redditimgur: import link flair as tags 2021-03-09 08:19:55 +03:00
Andrew Dolgov f4d0e7bb6d * af_redditimgur: optionally import score
* add pluginhost->set_array() to set many plugin settings at once
2021-03-07 15:21:31 +03:00
Andrew Dolgov 518e677a6b nsfw: fix wrong return parameter count in hook article image 2021-03-07 14:00:56 +03:00
Andrew Dolgov 266c8a6eae add nsfw.png placeholder 2021-03-07 13:26:03 +03:00
Andrew Dolgov ac6a59914b nsfw: support API clients 2021-03-07 13:22:38 +03:00
Andrew Dolgov d6fd0d5462 add some icons, remove some words 2021-03-06 23:51:48 +03:00
Andrew Dolgov b649d2240f split af_zz_noautoplay into a separate repo 2021-03-05 10:17:35 +03:00
Andrew Dolgov c8883d3440 af_comics filters: don't try to load empty html 2021-03-05 10:07:34 +03:00
Andrew Dolgov bc2953b5e7 split no_url_hashes into a separate repo 2021-03-05 09:55:28 +03:00
Andrew Dolgov 198c9b4069 split scored_oldest_first into a separate repo 2021-03-05 09:52:45 +03:00
Andrew Dolgov cb4b730e42 split af_unburn 2021-03-04 16:31:48 +03:00
Andrew Dolgov c50a4296a5 split vf_shared 2021-03-04 15:54:44 +03:00
Andrew Dolgov 2f6ea8b387 split a bunch of plugins into separate repos 2021-03-04 15:09:56 +03:00
Andrew Dolgov 4fda5ccd0e fix a bunch of bookmarklets login forms not leading back 2021-03-04 13:40:54 +03:00
Andrew Dolgov 3b67abb0ea reddit: import comment counts 2021-03-02 21:32:20 +03:00
Andrew Dolgov 7cf12233d7 use ORM when subscribing feeds 2021-03-02 10:11:42 +03:00
Andrew Dolgov 70adfd4a74 * sanitize: never rewrite relative links to our own prefix
* use Config::get_self_url() instead of get_self_url_prefix() in a bunch
of places
2021-03-02 08:16:41 +03:00
Andrew Dolgov 031ee47a3e don't try to pass string literal NOW() to ORM as a timestamp 2021-03-01 23:07:20 +03:00
Andrew Dolgov 8b1a2406e6 userhelper: use orm for a few more user-related things 2021-03-01 19:32:27 +03:00
Andrew Dolgov 2d1391a02b come to think of it, we don't need it at all 2021-03-01 15:50:41 +03:00
Andrew Dolgov dbad39d7a2 auth_internal: don't try to get otp_enabled on old schema 2021-03-01 15:49:44 +03:00
Andrew Dolgov 6359259dbb simplify internal authentication code and bump default algo to SSHA-512 2021-03-01 15:24:18 +03:00
Andrew Dolgov 320503dd39 move version-related stuff to Config; fix conditional feed requests 2021-03-01 13:43:37 +03:00
Andrew Dolgov 20a844085f hide version for bundled plugins because it's meaningless; for everything else support showing version using git (if about[0] is null) 2021-03-01 12:11:42 +03:00
Andrew Dolgov 7ef72fe0dc move startup checks to Config, set a bunch of @deprecated annotations 2021-03-01 10:20:21 +03:00
Andrew Dolgov bada1601fc OTP form: simplify layout, use dojo controls 2021-02-28 14:18:23 +03:00
Andrew Dolgov afc7142250 move all $fetch globals to UrlHelper 2021-02-28 10:12:57 +03:00
Andrew Dolgov 78a7b3642f af_redditimgur: allow adding custom tags for NSFW posts 2021-02-27 13:50:28 +03:00
Andrew Dolgov c521e26a19 use absolute namespace for readability 2021-02-26 19:55:49 +03:00
Andrew Dolgov 3fd7856543 * switch to composer for qrcode and otp dependencies
* move most OTP-related stuff into userhelper
* remove old phpqrcode and otphp libraries
2021-02-26 19:16:17 +03:00
Andrew Dolgov bc4475b669 add missing composer files 2021-02-26 17:39:57 +03:00
Andrew Dolgov cf1ede0ba8 pull latest readability-php via composer 2021-02-26 17:35:58 +03:00
Andrew Dolgov 167c9fc34e silence php8 warnings in otp secondary login form 2021-02-26 14:25:40 +03:00
Andrew Dolgov c96172fa04 use constants in get_pref()/set_pref() 2021-02-25 14:49:58 +03:00
Andrew Dolgov bd2314170d implement prefs UI based on new prefs class and a few more things 2021-02-25 12:46:13 +03:00
Andrew Dolgov 2ae0b7059f cleanup some defined-stuff 2021-02-23 09:01:27 +03:00
Andrew Dolgov cae54dad56 af_redditimgur: fix an oopsie 2021-02-23 00:27:52 +03:00
Andrew Dolgov 211f699aa0 migrate the rest into Config:: 2021-02-22 22:35:27 +03:00
Andrew Dolgov e4107ac952 wip: initial for config object 2021-02-22 21:47:48 +03:00
Andrew Dolgov 42173386b3 dirname(__FILE__) -> __DIR__ 2021-02-22 17:38:46 +03:00
Andrew Dolgov be4e7b1340 fix several issues reported by phpstan 2021-02-22 14:41:09 +03:00
Andrew Dolgov 33fff26869 reinstate HOOK_RENDER_ENCLOSURE 2021-02-22 10:00:50 +03:00
Andrew Dolgov 94560132dd for the most part, deal with filter rules UI 2021-02-21 09:35:07 +03:00
Andrew Dolgov 545bcc3e4b bookmarklets: cleanup some more markup 2021-02-20 08:49:40 +03:00
Andrew Dolgov fc0ebf0891 move bookmarklet-related methods out of public.php into the plugin 2021-02-19 20:21:36 +03:00
Andrew Dolgov cf249d7e8c modify classname helpers to use element.classList; fix feed debugger & share--get 2021-02-19 19:29:43 +03:00
Andrew Dolgov 5cec4eb015 af_readability: fix selector 2021-02-19 18:47:50 +03:00
Andrew Dolgov d445530fa0 format note on the client 2021-02-19 17:15:22 +03:00
Andrew Dolgov 660a1bbe01 * switch to xhr.post() almost everywhere
* call App.handlerpcjson() automatically on json request (if possible)
 * show net/log indicators in prefs
2021-02-19 13:44:56 +03:00
Andrew Dolgov 6b43b788d9 migrate xhrJson invocations to the new helper 2021-02-19 10:22:00 +03:00
Andrew Dolgov 00310d2d23 cleanup some unused code, fix App.byId() invoked by wrong name 2021-02-19 06:58:50 +03:00
Andrew Dolgov c088e9d9d8 get rid of a few more prototype-isms 2021-02-18 22:23:06 +03:00
Andrew Dolgov 70fa423026 initial for RIP prototype/scriptaculous 2021-02-18 21:51:18 +03:00
Andrew Dolgov bed36cbf9f af_psql_trgm: cleanup 2021-02-18 13:41:40 +03:00
Andrew Dolgov a2c75257f1 bookmarklets: cleanup 2021-02-18 13:16:55 +03:00
Andrew Dolgov d8a99ce06a remove unneeded headings 2021-02-18 12:45:31 +03:00
Andrew Dolgov 39c0fe3697 shorten many invocations of Ajax.Request in inline form methods 2021-02-18 12:27:26 +03:00
Andrew Dolgov ee0b66b6bd af_proxy_http: markup cleanup 2021-02-18 12:13:13 +03:00
Andrew Dolgov b888bc2091 cache_starred_images: don't try to use undefined array index 2021-02-17 21:54:43 +03:00
Andrew Dolgov e4609c18ef * add (disabled) shortcut syntax for plugin methods
* add controls shortcut for pluginhandler tags
 * add similar shortcut for frontend
 * allow plugins to selectively exclude their methods from CSRF checking
2021-02-17 21:44:21 +03:00
Andrew Dolgov 35b6d63289 af_proxy_http: don't try to proxy back to ourselves 2021-02-17 16:27:52 +03:00