From 99b1d551e61adb5cbd014677f151f443b0c6c35f Mon Sep 17 00:00:00 2001 From: hkcomori Date: Thu, 6 Jun 2024 03:58:19 +0900 Subject: Add core extensions: UserCSS, UserJS (#6267) * Copy CustomCSS and CustomJS Original: FreshRSS/Extensions@9f21984 * Rename CustomCSS -> UserCSS * Rename CustomJS -> UserJS * Change metadata The name is used for the directory where the configuration is stored and should not contain spaces. Since the name was changed, I reset the version number and changed to semantic versioning. * Change data directory Changed the location of the configuration file to the user data directory, because it is not `static`. That way, the user's configurations are gathered in the user directory, which makes it easier to backup them. * Edit documentations Remove procedures to install the extension because it is no longer necessary. * Fix wrong variables in the configuration page Remove permission error indication because the storage location is now in the user data directory managed by the application. * Remove the `xExtension-` prefix for core extensions * Set version to 1.0.0 for UserCSS, UserJS * Refactoring * Remove unused variables * Remove version 0.0.1 in Changelog Version 0.0.1 will not be merged, so only version 1.0.0 will remain. * public getFileUrl * Revert more protected * Use entrypoint for extension user path instead of name * Add space to extension name * Add `#[\Override]` * Add explains of User CSS and User JS to docs * Remove README of User CSS and User JS * Add migration code for extension user path --------- Co-authored-by: Alexandre Alapetite --- docs/i18n/templates/freshrss.pot | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'docs/i18n/templates') diff --git a/docs/i18n/templates/freshrss.pot b/docs/i18n/templates/freshrss.pot index 3cc0ca681..9cfdd6905 100644 --- a/docs/i18n/templates/freshrss.pot +++ b/docs/i18n/templates/freshrss.pot @@ -1630,8 +1630,11 @@ msgstr "" #: en/./developers/03_Backend/05_Extensions.md:58 #, no-wrap msgid "" -"class HelloWorldExtension extends Minz_Extension {\n" -"\tpublic function init() {\n" +"final class HelloWorldExtension extends Minz_Extension {\n" +"\t#[\Override]\n" +"\tpublic function init(): void {\n" +"\t\tparent::init();\n" +"\n" "\t\t// your code here\n" "\t}\n" "}\n" @@ -1911,9 +1914,12 @@ msgstr "" #: en/./developers/03_Backend/05_Extensions.md:134 #, no-wrap msgid "" -"class HelloWorldExtension extends Minz_Extension\n" +"final class HelloWorldExtension extends Minz_Extension\n" "{\n" -"\tpublic function init() {\n" +"\t#[\Override]\n" +"\tpublic function init(): void {\n" +"\t\tparent::init();\n" +"\n" "\t\t$this->registerHook('entry_before_display', array($this, " "'renderEntry'));\n" "\t}\n" -- cgit v1.2.3