Refactoring to use frantic from paranoia.wf's format. Greentext is back
This commit is contained in:
50
patches/add_custom_reactions.sh
Executable file
50
patches/add_custom_reactions.sh
Executable file
@@ -0,0 +1,50 @@
|
||||
#!/bin/sh
|
||||
|
||||
# This file is part of the element-web-patches.
|
||||
#
|
||||
# element-web-patches is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by the
|
||||
# Free Software Foundation, either version 3 of the License,
|
||||
# or (at your option) any later version.
|
||||
#
|
||||
# element-web-patches is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
# See the GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with element-web-patches. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
echo 'Backing up compact.json...'
|
||||
if [ ! -f ${1}/node_modules/emojibase-data/en/compact_backup.json ]; then
|
||||
cp ${1}/node_modules/emojibase-data/en/compact.json ${1}/node_modules/emojibase-data/en/compact_backup.json
|
||||
else
|
||||
cp ${1}/node_modules/emojibase-data/en/compact_backup.json ${1}/node_modules/emojibase-data/en/compact.json
|
||||
fi
|
||||
|
||||
echo 'Adding custom emoji...'
|
||||
{
|
||||
./reactions/generate.sh > "./reactions/data-injects~.json";
|
||||
jq -sc '.[0] + .[1]' "${1}/node_modules/emojibase-data/en/compact_backup.json" "./reactions/data-injects~.json" > "${1}/node_modules/emojibase-data/en/compact.json";
|
||||
rm "./reactions/data-injects~.json";
|
||||
} || { echo "Failed to inject reactions: Exit code $?" 1>&2; exit $?; }
|
||||
|
||||
|
||||
echo 'Backing up _EmojiPicker.pcss...'
|
||||
if [ ! -f "${1}"/node_modules/matrix-react-sdk/res/css/views/emojipicker/_EmojiPicker.pcss.backup ]; then
|
||||
cp "${1}"/node_modules/matrix-react-sdk/res/css/views/emojipicker/_EmojiPicker.pcss "${1}"/node_modules/matrix-react-sdk/res/css/views/emojipicker/_EmojiPicker.pcss.backup
|
||||
else
|
||||
cp "${1}"/node_modules/matrix-react-sdk/res/css/views/emojipicker/_EmojiPicker.pcss.backup "${1}"/node_modules/matrix-react-sdk/res/css/views/emojipicker/_EmojiPicker.pcss
|
||||
fi
|
||||
|
||||
echo 'Adding custom emoji picker CSS...'
|
||||
emoji_picker_css_code=$(cat << EOF
|
||||
.mx_EmojiPicker_item_wrapper {
|
||||
text-overflow: clip;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
}
|
||||
EOF
|
||||
)
|
||||
|
||||
echo "${emoji_picker_css_code}" >> "${1}"/node_modules/matrix-react-sdk/res/css/views/emojipicker/_EmojiPicker.pcss
|
27
patches/add_greentext.sh
Executable file
27
patches/add_greentext.sh
Executable file
@@ -0,0 +1,27 @@
|
||||
#!/bin/sh
|
||||
|
||||
# This file is part of the element-web-patches.
|
||||
#
|
||||
# element-web-patches is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by the
|
||||
# Free Software Foundation, either version 3 of the License,
|
||||
# or (at your option) any later version.
|
||||
#
|
||||
# element-web-patches is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
# See the GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with element-web-patches. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
#echo "Enter the path to your background JPEG file"
|
||||
#read -ep "> " background_path
|
||||
set -euo pipefail
|
||||
LWD="$PWD"
|
||||
|
||||
echo "Adding greentext..."
|
||||
cd $1
|
||||
patch -p1 < $LWD/files/greentext.patch
|
||||
patch -p1 < $LWD/files/greentext_command.patch
|
||||
cd $LWD
|
59
patches/delete_login_footer.sh
Executable file
59
patches/delete_login_footer.sh
Executable file
@@ -0,0 +1,59 @@
|
||||
#!/bin/sh
|
||||
|
||||
# This file is part of the element-web-patches.
|
||||
#
|
||||
# element-web-patches is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by the
|
||||
# Free Software Foundation, either version 3 of the License,
|
||||
# or (at your option) any later version.
|
||||
#
|
||||
# element-web-patches is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
# See the GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with element-web-patches. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
echo "Deleting login footer..."
|
||||
|
||||
error() {
|
||||
echo "Failed to patch, exiting..."
|
||||
exit 1
|
||||
}
|
||||
|
||||
patch_content=$(cat << EOF
|
||||
--- a/components.json
|
||||
+++ b/components.json
|
||||
@@ -1,5 +1,4 @@
|
||||
{
|
||||
- "src/components/views/auth/AuthFooter.tsx": "src/components/views/auth/VectorAuthFooter.tsx",
|
||||
"src/components/views/auth/AuthHeaderLogo.tsx": "src/components/views/auth/VectorAuthHeaderLogo.tsx",
|
||||
"src/components/views/auth/AuthPage.tsx": "src/components/views/auth/VectorAuthPage.tsx"
|
||||
}
|
||||
--- a/src/components/views/auth/VectorAuthPage.tsx
|
||||
+++ b/src/components/views/auth/VectorAuthPage.tsx
|
||||
@@ -17,8 +17,6 @@
|
||||
import * as React from "react";
|
||||
import SdkConfig from "matrix-react-sdk/src/SdkConfig";
|
||||
|
||||
-import VectorAuthFooter from "./VectorAuthFooter";
|
||||
-
|
||||
export default class VectorAuthPage extends React.PureComponent {
|
||||
private static welcomeBackgroundUrl?: string;
|
||||
|
||||
@@ -77,7 +75,6 @@
|
||||
{this.props.children}
|
||||
</div>
|
||||
</div>
|
||||
- <VectorAuthFooter />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
EOF
|
||||
)
|
||||
|
||||
(cd "${1}" && echo "${patch_content}" | patch -p1) || error
|
||||
rm -f "${1}"/src/components/views/auth/VectorAuthFooter.tsx \
|
||||
"${1}"/test/unit-tests/components/views/auth/VectorAuthFooter-test.tsx \
|
||||
"${1}"/test/unit-tests/components/views/auth/__snapshots__/VectorAuthFooter-test.tsx.snap
|
71
patches/files/config.json
Normal file
71
patches/files/config.json
Normal file
@@ -0,0 +1,71 @@
|
||||
{
|
||||
"default_server_config": {
|
||||
"m.homeserver": {
|
||||
"base_url": "https://glowers.club",
|
||||
"server_name": "Glowers Club"
|
||||
}
|
||||
},
|
||||
"disable_custom_urls": false,
|
||||
"disable_guests": true,
|
||||
"disable_login_language_selector": false,
|
||||
"disable_3pid_login": false,
|
||||
"brand": "Glowers Club",
|
||||
"integrations_ui_url": "https://dimension.midov.pl/element",
|
||||
"integrations_rest_url": "https://dimension.midov.pl/api/v1/scalar",
|
||||
"integrations_widgets_urls": ["https://dimension.midov.pl/widgets"],
|
||||
"integrations_jitsi_widget_url": "https://dimension.midov.pl/widgets/jitsi",
|
||||
"bug_report_endpoint_url": "https://element.io/bugreports/submit",
|
||||
"defaultCountryCode": "US",
|
||||
"showLabsSettings": true,
|
||||
"features": {
|
||||
"feature_many_integration_managers": "labs",
|
||||
"feature_pinning": "enable",
|
||||
"feature_custom_tags": "labs",
|
||||
"feature_state_counters": "labs",
|
||||
"feature_custom_themes" : "labs",
|
||||
"feature_bridge_state": "labs",
|
||||
"feature_mjolnir" : "labs",
|
||||
"feature_presence_in_room_list": "labs",
|
||||
"feature_roomlist_preview_reactions_all": "labs",
|
||||
"feature_roomlist_preview_reactions_dms": "labs",
|
||||
"feature_dm_verification": "labs",
|
||||
"feature_latex_maths": "labs",
|
||||
"feature_dehydration": "labs",
|
||||
"feature_report_to_moderators": "labs",
|
||||
"feature_polls": "labs",
|
||||
"feature_location_share_pin_drop": "labs",
|
||||
"feature_location_share_live": "labs",
|
||||
"feature_spotlight": "labs",
|
||||
"feature_jump_to_date": "labs",
|
||||
"feature_video_rooms": "labs",
|
||||
"feature_html_topic": "labs",
|
||||
"feature_exploring_public_spaces": "labs",
|
||||
"feature_favourite_messages": "labs",
|
||||
"feature_element_call_video_rooms": "labs",
|
||||
"feature_group_calls": "labs",
|
||||
"feature_qr_signin_reciprocate_show": "labs",
|
||||
"feature_rust_crypto": "disable",
|
||||
"feature_ask_to_join": "enable",
|
||||
"feature_notifications": "enable",
|
||||
"feature_extensible_events": "labs"
|
||||
},
|
||||
"default_federate": true,
|
||||
"default_theme": "dark",
|
||||
"roomDirectory": {
|
||||
"servers": [
|
||||
"glowers.club",
|
||||
"200acres.org",
|
||||
"matrix.kiwifarms.net",
|
||||
"matrix.org",
|
||||
"midov.pl",
|
||||
"nerdsin.space",
|
||||
"poa.st"
|
||||
]
|
||||
},
|
||||
"jitsi": {
|
||||
"preferredDomain": "meet.element.io"
|
||||
},
|
||||
"enable_presence_by_hs_url": {
|
||||
"https://glowers.club": false
|
||||
}
|
||||
}
|
131
patches/files/greentext.patch
Normal file
131
patches/files/greentext.patch
Normal file
File diff suppressed because one or more lines are too long
32
patches/files/greentext_command.patch
Normal file
32
patches/files/greentext_command.patch
Normal file
@@ -0,0 +1,32 @@
|
||||
--- a/node_modules/matrix-react-sdk/src/SlashCommands.tsx
|
||||
+++ b/node_modules/matrix-react-sdk/src/SlashCommands.tsx
|
||||
@@ -68,6 +68,29 @@
|
||||
|
||||
export const Commands = [
|
||||
new Command({
|
||||
+ command: "greentext",
|
||||
+ args: "<message>",
|
||||
+ description: _td("4chan-like greentext arrows"),
|
||||
+ runFn: function(cli, roomId, threadId, args) {
|
||||
+ const texts = args.split(/\n{2,}(.+|\n+)/g);
|
||||
+ const greentext = texts[0];
|
||||
+ const normalText = texts[1] || "";
|
||||
+
|
||||
+ let plainGreentext = greentext.replace(/^/g, ">");
|
||||
+ plainGreentext = plainGreentext.replace(/(?:\r\n|\r|\n)+/g, "\n>");
|
||||
+
|
||||
+ let htmlGreentext = greentext.replace(/^/g, ">");
|
||||
+ htmlGreentext = htmlGreentext.replace(/(?:\r\n|\r|\n)+/g, "<br />>");
|
||||
+
|
||||
+ return success(ContentHelpers.makeHtmlMessage(
|
||||
+ plainGreentext + "\n" + normalText,
|
||||
+ `<font color="#789922">${htmlGreentext}</font><br/>${normalText}`,
|
||||
+ ));
|
||||
+ },
|
||||
+ category: CommandCategories.messages,
|
||||
+ }),
|
||||
+
|
||||
+ new Command({
|
||||
command: "spoiler",
|
||||
args: "<message>",
|
||||
description: _td("slash_command|spoiler"),
|
BIN
patches/files/lake.jpg
Executable file
BIN
patches/files/lake.jpg
Executable file
Binary file not shown.
After Width: | Height: | Size: 3.3 MiB |
BIN
patches/files/message.mp3
Executable file
BIN
patches/files/message.mp3
Executable file
Binary file not shown.
BIN
patches/files/message.ogg
Executable file
BIN
patches/files/message.ogg
Executable file
Binary file not shown.
27
patches/patch_all.sh
Executable file
27
patches/patch_all.sh
Executable file
@@ -0,0 +1,27 @@
|
||||
#!/bin/sh
|
||||
# This file is part of the element-web-patches.
|
||||
#
|
||||
# element-web-patches is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by the
|
||||
# Free Software Foundation, either version 3 of the License,
|
||||
# or (at your option) any later version.
|
||||
#
|
||||
# element-web-patches is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
# See the GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with element-web-patches. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
element=../element-web
|
||||
|
||||
# Running the shell scripts:
|
||||
./add_custom_reactions.sh $element
|
||||
./add_greentext.sh $element
|
||||
./delete_login_footer.sh $element
|
||||
./remove-share-to-nonfree-services.sh $element
|
||||
./rename_remove_and_ban.sh $element
|
||||
./replace_config_file.sh $element
|
||||
./replace_login_background.sh $element
|
||||
./replace_notification_sound.sh $element
|
22
patches/reactions/fetch-latest-format.sh
Executable file
22
patches/reactions/fetch-latest-format.sh
Executable file
@@ -0,0 +1,22 @@
|
||||
#!/bin/sh
|
||||
|
||||
# This file is part of the element-web-patches.
|
||||
#
|
||||
# element-web-patches is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by the
|
||||
# Free Software Foundation, either version 3 of the License,
|
||||
# or (at your option) any later version.
|
||||
#
|
||||
# element-web-patches is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
# See the GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with element-web-patches. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
base="https://raw.githubusercontent.com/milesj/emojibase/master/packages/data/en"
|
||||
for file in compact.raw.json data.raw.json; do
|
||||
echo "$file:"
|
||||
curl -sf "$base/$file" | jq '.[] | select(.hexcode == "2721")' || exit $?
|
||||
done
|
38
patches/reactions/generate.sh
Executable file
38
patches/reactions/generate.sh
Executable file
@@ -0,0 +1,38 @@
|
||||
#!/bin/sh
|
||||
|
||||
# This file is part of the element-web-patches.
|
||||
#
|
||||
# element-web-patches is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by the
|
||||
# Free Software Foundation, either version 3 of the License,
|
||||
# or (at your option) any later version.
|
||||
#
|
||||
# element-web-patches is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
# See the GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with element-web-patches. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
# Run fetch-latest-format.sh for the most up-to-date emojibase format. Target is raw.json
|
||||
reactions="$(yq . /dev/stdin < ./reactions/reactions.yaml)"
|
||||
jq -n --argjson reactions "$reactions" \
|
||||
'[
|
||||
$reactions[] | {
|
||||
annotation: .emoji,
|
||||
label: .emoji,
|
||||
emoticon: .emoji,
|
||||
hexcode: "2721",
|
||||
unicode: .emoji,
|
||||
shortcodes: (.tags? + [ .emoji ]),
|
||||
tags: (.tags? + [ .emoji ]),
|
||||
emoji: .emoji,
|
||||
text: .emoji,
|
||||
type: 0,
|
||||
order: 0,
|
||||
group: 8,
|
||||
subgroup: 93,
|
||||
version: 0.7
|
||||
}
|
||||
]'
|
33
patches/reactions/reactions.yaml
Normal file
33
patches/reactions/reactions.yaml
Normal file
@@ -0,0 +1,33 @@
|
||||
- emoji: based
|
||||
- emoji: cringe
|
||||
- emoji: yikes
|
||||
- emoji: cope
|
||||
- emoji: seethe
|
||||
- emoji: dilate
|
||||
- emoji: '>'
|
||||
- emoji: 't. jewish'
|
||||
- emoji: 't. tard'
|
||||
- emoji: '>implying'
|
||||
- emoji: '>she'
|
||||
- emoji: '>her'
|
||||
- emoji: 'tard moment'
|
||||
- emoji: 'woman moment'
|
||||
- emoji: Yes.
|
||||
- emoji: No.
|
||||
- emoji: (You)
|
||||
- emoji: lol
|
||||
- emoji: RAPE
|
||||
- emoji: F
|
||||
- emoji: vaggot
|
||||
- emoji: vaxnigger
|
||||
- emoji: Fag
|
||||
- emoji: simp
|
||||
- emoji: piss
|
||||
- emoji: jelq
|
||||
- emoji: coom
|
||||
- emoji: booba
|
||||
- emoji: sinner
|
||||
- emoji: repent
|
||||
- emoji: 卐
|
||||
tags:
|
||||
- swastika
|
97
patches/remove-share-to-nonfree-services.sh
Executable file
97
patches/remove-share-to-nonfree-services.sh
Executable file
@@ -0,0 +1,97 @@
|
||||
#!/bin/sh
|
||||
|
||||
# This file is part of the element-web-patches.
|
||||
#
|
||||
# element-web-patches is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by the
|
||||
# Free Software Foundation, either version 3 of the License,
|
||||
# or (at your option) any later version.
|
||||
#
|
||||
# element-web-patches is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
# See the GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with element-web-patches. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
echo "Removing links to nonfree services..."
|
||||
|
||||
error() {
|
||||
echo "Failed to patch, exiting..."
|
||||
exit 1
|
||||
}
|
||||
|
||||
patch_content=$(cat << EOF
|
||||
--- a/node_modules/matrix-react-sdk/lib/components/views/dialogs/ShareDialog.js
|
||||
+++ b/node_modules/matrix-react-sdk/lib/components/views/dialogs/ShareDialog.js
|
||||
@@ -37,28 +37,6 @@
|
||||
*/
|
||||
|
||||
const socials = [{
|
||||
- name: "Facebook",
|
||||
- img: require("../../../../res/img/social/facebook.png"),
|
||||
- url: url => \`https://www.facebook.com/sharer/sharer.php?u=\${url}\`
|
||||
-}, {
|
||||
- name: "Twitter",
|
||||
- img: require("../../../../res/img/social/twitter-2.png"),
|
||||
- url: url => \`https://twitter.com/home?status=\${url}\`
|
||||
-},
|
||||
-/* // icon missing
|
||||
- name: 'Google Plus',
|
||||
- img: 'img/social/',
|
||||
- url: (url) => \`https://plus.google.com/share?url=\${url}\`,
|
||||
-},*/
|
||||
-{
|
||||
- name: "LinkedIn",
|
||||
- img: require("../../../../res/img/social/linkedin.png"),
|
||||
- url: url => \`https://www.linkedin.com/shareArticle?mini=true&url=\${url}\`
|
||||
-}, {
|
||||
- name: "Reddit",
|
||||
- img: require("../../../../res/img/social/reddit.png"),
|
||||
- url: url => \`https://www.reddit.com/submit?url=\${url}\`
|
||||
-}, {
|
||||
name: "email",
|
||||
img: require("../../../../res/img/social/email-1.png"),
|
||||
url: url => \`mailto:?body=\${url}\`
|
||||
--- a/node_modules/matrix-react-sdk/src/components/views/dialogs/ShareDialog.tsx
|
||||
+++ b/node_modules/matrix-react-sdk/src/components/views/dialogs/ShareDialog.tsx
|
||||
@@ -31,30 +31,6 @@
|
||||
|
||||
const socials = [
|
||||
{
|
||||
- name: "Facebook",
|
||||
- img: require("../../../../res/img/social/facebook.png"),
|
||||
- url: (url: String) => \`https://www.facebook.com/sharer/sharer.php?u=\${url}\`,
|
||||
- },
|
||||
- {
|
||||
- name: "Twitter",
|
||||
- img: require("../../../../res/img/social/twitter-2.png"),
|
||||
- url: (url: string) => \`https://twitter.com/home?status=\${url}\`,
|
||||
- },
|
||||
- /* // icon missing
|
||||
- name: 'Google Plus',
|
||||
- img: 'img/social/',
|
||||
- url: (url) => \`https://plus.google.com/share?url=\${url}\`,
|
||||
- },*/ {
|
||||
- name: "LinkedIn",
|
||||
- img: require("../../../../res/img/social/linkedin.png"),
|
||||
- url: (url: string) => \`https://www.linkedin.com/shareArticle?mini=true&url=\${url}\`,
|
||||
- },
|
||||
- {
|
||||
- name: "Reddit",
|
||||
- img: require("../../../../res/img/social/reddit.png"),
|
||||
- url: (url: string) => \`https://www.reddit.com/submit?url=\${url}\`,
|
||||
- },
|
||||
- {
|
||||
name: "email",
|
||||
img: require("../../../../res/img/social/email-1.png"),
|
||||
url: (url: string) => \`mailto:?body=\${url}\`,
|
||||
EOF
|
||||
)
|
||||
|
||||
(cd "${1}" && echo "${patch_content}" | patch -p1) || error
|
||||
rm -f "${1}"/node_modules/matrix-react-sdk/res/img/social/facebook.png \
|
||||
"${1}"/node_modules/matrix-react-sdk/res/img/social/linkedin.png \
|
||||
"${1}"/node_modules/matrix-react-sdk/res/img/social/reddit.png \
|
||||
"${1}"/node_modules/matrix-react-sdk/res/img/social/twitter-2.png \
|
76
patches/rename_remove_and_ban.sh
Executable file
76
patches/rename_remove_and_ban.sh
Executable file
@@ -0,0 +1,76 @@
|
||||
#!/bin/sh
|
||||
|
||||
# This file is part of the element-web-patches.
|
||||
#
|
||||
# element-web-patches is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by the
|
||||
# Free Software Foundation, either version 3 of the License,
|
||||
# or (at your option) any later version.
|
||||
#
|
||||
# element-web-patches is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
# See the GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with element-web-patches. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
echo "Renaming remove & ban..."
|
||||
|
||||
# Modify these to your liking
|
||||
remove_command="holocaust"
|
||||
remove_command_plural="holocausts"
|
||||
remove_command_past_tense="holocausted"
|
||||
|
||||
capital_remove_command="Holocaust"
|
||||
capital_remove_command_plural="Holocausts"
|
||||
capital_remove_command_past_tense="Holocausted"
|
||||
|
||||
ban_command="gas"
|
||||
ban_command_plural="gasses"
|
||||
ban_command_past_tense="gassed"
|
||||
|
||||
capital_ban_command="Gas"
|
||||
capital_ban_command_plural="Gasses"
|
||||
capital_ban_command_past_tense="Gassed"
|
||||
|
||||
error() {
|
||||
echo "Failed to rename, exiting..."
|
||||
exit 1
|
||||
}
|
||||
|
||||
# Remove
|
||||
sed -i -e "s/remove/${remove_command}/g" \
|
||||
-e "s/Removes/${capital_remove_command_plural}/g" "${1}"/node_modules/matrix-react-sdk/src/SlashCommands.tsx
|
||||
|
||||
sed -i -e "s/\"Remove/\"${capital_remove_command}/g" \
|
||||
-e "s/Failed to remove/Failed to ${remove_command}/g" "${1}"/node_modules/matrix-react-sdk/src/components/views/right_panel/UserInfo.tsx
|
||||
|
||||
sed -i -e "s/Removes user/${capital_remove_command_plural} user/g" \
|
||||
-e "s/)s removed %(tar/)s ${remove_command_past_tense} %(tar/g" \
|
||||
-e "s/\"Remove,/\"${capital_remove_command},/g" \
|
||||
-e "s/You were removed/You were ${remove_command_past_tense}/g" \
|
||||
-e "s/Remove from/${capital_remove_command} from/g" \
|
||||
-e "s/removed\"/${remove_command_past_tense}\"/g" "${1}"/node_modules/matrix-react-sdk/src/i18n/strings/en_EN.json
|
||||
|
||||
sed -i -e "s/senderName)s removed %(targetName/senderName)s ${remove_command_past_tense} %(targetName/g" "${1}"/node_modules/matrix-react-sdk/src/TextForEvent.tsx
|
||||
sed -i -e "s/removed/${remove_command_past_tense}/g" "${1}"/node_modules/matrix-react-sdk/src/components/views/rooms/RoomPreviewBar.tsx
|
||||
sed -i -e "s/Remove users/${capital_remove_command} users/g" "${1}"/node_modules/matrix-react-sdk/src/components/views/settings/tabs/room/RolesRoomSettingsTab.tsx
|
||||
sed -i -e "s/${capital_remove_command} recent/Remove recent/g" "${1}"/node_modules/matrix-react-sdk/src/i18n/strings/en_EN.json
|
||||
sed -i -e "s/${capital_remove_command} recent/Remove recent/g" "${1}"/node_modules/matrix-react-sdk/src/components/views/right_panel/UserInfo.tsx
|
||||
|
||||
# Ban
|
||||
sed -i -e "s/\"Ban\"/\"${capital_ban_command}\"/g" "${1}"/node_modules/matrix-react-sdk/src/components/views/right_panel/UserInfo.tsx || error
|
||||
|
||||
sed -i -e "s/Bans user with given id\",/${capital_ban_command_plural} user with given id\",/g" \
|
||||
-e "s/\"Ban from %(roomName)s\",/\"${capital_ban_command} from %(roomName)s\",/g" \
|
||||
-e "s/\"Ban\"/\"${capital_ban_command}\"/g" \
|
||||
-e "s/\"Banned by %(displayName)s\",/\"${capital_ban_command_past_tense} by %(displayName)s\",/g" \
|
||||
-e "s/\"Banned users\",/\"${capital_ban_command_past_tense} users\",/g" \
|
||||
-e "s/was banned\",/was ${ban_command_past_tense}\",/g" \
|
||||
-e "s/was banned %(count)s times\",/was ${ban_command_past_tense} %(count)s times\",/g" \
|
||||
-e "s/were banned\",/were ${ban_command_past_tense}\",/g" \
|
||||
-e "s/banned from %(roomName)s by %(memberName)s\",/${ban_command_past_tense} from %(roomName)s by %(memberName)s\",/g" \
|
||||
-e "s/were banned %(count)s times\",/were ${ban_command_past_tense} %(count)s times\",/g" \
|
||||
-e "s/s banned %(targetName)s: %(reason)s\",/s ${ban_command_past_tense} %(targetName)s: %(reason)s\",/g" \
|
||||
-e "s/s banned %(targetName)s\",/s ${ban_command_past_tense} %(targetName)s\",/g" "${1}"/node_modules/matrix-react-sdk/src/i18n/strings/en_EN.json || error
|
20
patches/replace_config_file.sh
Executable file
20
patches/replace_config_file.sh
Executable file
@@ -0,0 +1,20 @@
|
||||
#!/bin/sh
|
||||
|
||||
# This file is part of the element-web-patches.
|
||||
#
|
||||
# element-web-patches is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by the
|
||||
# Free Software Foundation, either version 3 of the License,
|
||||
# or (at your option) any later version.
|
||||
#
|
||||
# element-web-patches is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
# See the GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with element-web-patches. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
echo "Replacing config file..."
|
||||
|
||||
cp -f "./files/config.json" "${1}"/config.sample.json
|
23
patches/replace_login_background.sh
Executable file
23
patches/replace_login_background.sh
Executable file
@@ -0,0 +1,23 @@
|
||||
#!/bin/sh
|
||||
|
||||
# This file is part of the element-web-patches.
|
||||
#
|
||||
# element-web-patches is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by the
|
||||
# Free Software Foundation, either version 3 of the License,
|
||||
# or (at your option) any later version.
|
||||
#
|
||||
# element-web-patches is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
# See the GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with element-web-patches. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
#echo "Enter the path to your background JPEG file"
|
||||
#read -ep "> " background_path
|
||||
|
||||
echo "Replacing login background..."
|
||||
|
||||
cp -f "./files/lake.jpg" "${1}"/res/themes/element/img/backgrounds/lake.jpg
|
30
patches/replace_notification_sound.sh
Executable file
30
patches/replace_notification_sound.sh
Executable file
@@ -0,0 +1,30 @@
|
||||
#!/bin/sh
|
||||
|
||||
# This file is part of the element-web-patches.
|
||||
#
|
||||
# element-web-patches is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by the
|
||||
# Free Software Foundation, either version 3 of the License,
|
||||
# or (at your option) any later version.
|
||||
#
|
||||
# element-web-patches is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
# See the GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with element-web-patches. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
#echo "Enter the path to your notification MP3 file"
|
||||
#read -ep "> " notification_mp3_path
|
||||
|
||||
#echo "Enter the path to your notification OGG file"
|
||||
#read -ep "> " notification_ogg_path
|
||||
|
||||
echo "Replacing notification sounds..."
|
||||
|
||||
#cp -f "./files/message.mp3" "${1}"/webapp/media/message.mp3
|
||||
cp -f "./files/message.mp3" "${1}"/node_modules/matrix-react-sdk/res/media/message.mp3
|
||||
|
||||
#cp -f "./files/message.ogg" "${1}"/webapp/media/message.ogg
|
||||
cp -f "./files/message.ogg" "${1}"/node_modules/matrix-react-sdk/res/media/message.ogg
|
Reference in New Issue
Block a user