From 7af4934134b45c12ccb698b4125e7a11c2d930a8 Mon Sep 17 00:00:00 2001 From: Lina Date: Fri, 7 Jul 2023 23:35:52 +0000 Subject: [PATCH 1/9] add status prepend import statement --- app/javascript/flavours/glitch/components/status.jsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/javascript/flavours/glitch/components/status.jsx b/app/javascript/flavours/glitch/components/status.jsx index 28eef1824fd295..dd75bdbb33306c 100644 --- a/app/javascript/flavours/glitch/components/status.jsx +++ b/app/javascript/flavours/glitch/components/status.jsx @@ -7,12 +7,13 @@ import classNames from 'classnames'; import ImmutablePropTypes from 'react-immutable-proptypes'; import ImmutablePureComponent from 'react-immutable-pure-component'; +import { HotKeys } from 'react-hotkeys'; + import PictureInPicturePlaceholder from 'flavours/glitch/components/picture_in_picture_placeholder'; import PollContainer from 'flavours/glitch/containers/poll_container'; import NotificationOverlayContainer from 'flavours/glitch/features/notifications/containers/overlay_container'; import { displayMedia } from 'flavours/glitch/initial_state'; import { autoUnfoldCW } from 'flavours/glitch/utils/content_warning'; -import { HotKeys } from 'react-hotkeys'; import Card from '../features/status/components/card'; import Bundle from '../features/ui/components/bundle'; @@ -24,6 +25,7 @@ import StatusContent from './status_content'; import StatusExpandButton from './status_expand_button'; import StatusHeader from './status_header'; import StatusIcons from './status_icons'; +import StatusPrepend from './status_prepend'; const domParser = new DOMParser(); From 0233eb494106a1c4e0562ecbb6dd952139d58e91 Mon Sep 17 00:00:00 2001 From: sneakers-the-rat Date: Sat, 17 Feb 2024 13:10:26 -0800 Subject: [PATCH 2/9] Properly unset inherited css fix i18n extract --- app/javascript/flavours/glitch/locales/en.json | 1 - .../styles/neuromatchstodon/bigger_collapsed_statuses.scss | 2 ++ 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/app/javascript/flavours/glitch/locales/en.json b/app/javascript/flavours/glitch/locales/en.json index 3c3a161598cfb7..b76502c6243239 100644 --- a/app/javascript/flavours/glitch/locales/en.json +++ b/app/javascript/flavours/glitch/locales/en.json @@ -151,7 +151,6 @@ "settings.wide_view": "Wide view (Desktop mode only)", "settings.wide_view_hint": "Stretches columns to better fill the available space.", "status.collapse": "Collapse", - "status.favorite": "Favorite", "status.has_audio": "Features attached audio files", "status.has_pictures": "Features attached pictures", "status.has_preview_card": "Features an attached preview card", diff --git a/app/javascript/flavours/glitch/styles/neuromatchstodon/bigger_collapsed_statuses.scss b/app/javascript/flavours/glitch/styles/neuromatchstodon/bigger_collapsed_statuses.scss index 73a04bf5259b58..fefaab9574b3d5 100644 --- a/app/javascript/flavours/glitch/styles/neuromatchstodon/bigger_collapsed_statuses.scss +++ b/app/javascript/flavours/glitch/styles/neuromatchstodon/bigger_collapsed_statuses.scss @@ -1,10 +1,12 @@ .status { &.collapsed { .status__content { + height: unset; max-height: 6em; padding-top: unset; &::after { + top: unset; height: 40%; } } From f178d892bf4779f3ce3b2550c0324ab934f69139 Mon Sep 17 00:00:00 2001 From: sneakers-the-rat Date: Sat, 17 Feb 2024 14:12:43 -0800 Subject: [PATCH 3/9] Move the expand button over when in a thread --- .../neuromatchstodon/bigger_collapsed_statuses.scss | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/app/javascript/flavours/glitch/styles/neuromatchstodon/bigger_collapsed_statuses.scss b/app/javascript/flavours/glitch/styles/neuromatchstodon/bigger_collapsed_statuses.scss index fefaab9574b3d5..1e21b39f1af9b1 100644 --- a/app/javascript/flavours/glitch/styles/neuromatchstodon/bigger_collapsed_statuses.scss +++ b/app/javascript/flavours/glitch/styles/neuromatchstodon/bigger_collapsed_statuses.scss @@ -11,4 +11,12 @@ } } } + + &--in-thread { + &.collapsed { + & > button { + margin-inline-start: 46px + 10px; + } + } + } } From 0cc097e8bb56d4cf15bb70c999c857cf2e1c0ae4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lina=C2=B2?= <20880695+hobgoblina@users.noreply.github.com> Date: Wed, 10 Apr 2024 22:52:06 -0400 Subject: [PATCH 4/9] robots.txt updating action --- .github/workflows/update-robots-txt.yml | 88 +++++++++++++++++++++++++ 1 file changed, 88 insertions(+) create mode 100644 .github/workflows/update-robots-txt.yml diff --git a/.github/workflows/update-robots-txt.yml b/.github/workflows/update-robots-txt.yml new file mode 100644 index 00000000000000..e29f0a6bcf435c --- /dev/null +++ b/.github/workflows/update-robots-txt.yml @@ -0,0 +1,88 @@ +name: Update robots.txt + +permissions: write-all + +on: + schedule: + - cron: '0 0 * * 0' + workflow_dispatch: + +jobs: + sync-upstream: + runs-on: ubuntu-latest + steps: + - name: Create Branch + env: + GITHUB_TOKEN: ${{ github.token }} + uses: peterjgrainger/action-create-branch@v2.2.0 + with: + branch: robots.txt-update + - name: Checkout + uses: actions/checkout@v3 + with: + ref: robots.txt-update + fetch-depth: 0 + - name: Update robot.txt + id: update + env: + API_KEY: ${{ secrets.ROBOTS }} + run: | + '# _---~~(~~-_. + # _{ ) ) + # , ) -~~- ( ,-' )_ + # ( `-,_..`., )-- '_,) + # ( ` _) ( -~( -_ `, } + # (_- _ ~_-~~~~`, ,' ) + # `~ -^( __;-,((())) + # ~~~~ {_ -_(()) + # `\ } + # { } + # BRAAAAAAAAIIIINNSSSSSSS + + ' >> public/robots.txt + curl --location 'https://api.darkvisitors.com/robots-txts' \ + --header 'Content-Type: application/json' \ + --header 'Authorization: Bearer $API_KEY' \ + --data '{ "agent_types": [ "AI Data Scraper", "AI Assistant", "AI Search Crawler" ], "disallow": "/" }' > public/robots.txt + git add public/robots.txt + changes=$(git push origin 2>&1) + if [ "$changes" = "Everything up-to-date" ]; then + echo "skip=true" >> "$GITHUB_OUTPUT" + fi + - name: Check if PR exists + env: + GH_TOKEN: ${{ github.token }} + id: check + run: | + prs=$(gh pr list \ + --repo "$GITHUB_REPOSITORY" \ + --json baseRefName,headRefName \ + --jq ' + map(select(.baseRefName == "dev" and .headRefName == "robots.txt-update")) + | length + ') + if ((prs > 0)); then + echo "skip=true" >> "$GITHUB_OUTPUT" + fi + - name: Create Pull Request + if: | + !steps.check.outputs.skip && + !steps.update.outputs.skip + uses: actions/github-script@v6 + with: + script: | + const { repo, owner } = context.repo; + const result = await github.rest.pulls.create({ + title: 'Update robots.txt', + owner, + repo, + head: 'robots.txt-update', + base: 'dev', + body: 'This PR was *auto-generated* by the `Update robots.txt` action and contains updates to our robots.txt file, pulled from [Dark Visitors](https://darkvisitors.com/).' + }); + github.rest.issues.addLabels({ + owner, + repo, + issue_number: result.data.number, + labels: ['automated pr'] + }); \ No newline at end of file From 091371b97aed08638cbcaf04a9848d23261eb3e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lina=C2=B2?= <20880695+hobgoblina@users.noreply.github.com> Date: Wed, 10 Apr 2024 23:02:10 -0400 Subject: [PATCH 5/9] job name --- .github/workflows/update-robots-txt.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/update-robots-txt.yml b/.github/workflows/update-robots-txt.yml index e29f0a6bcf435c..125781d8eaeafe 100644 --- a/.github/workflows/update-robots-txt.yml +++ b/.github/workflows/update-robots-txt.yml @@ -8,7 +8,7 @@ on: workflow_dispatch: jobs: - sync-upstream: + update-robots: runs-on: ubuntu-latest steps: - name: Create Branch @@ -85,4 +85,4 @@ jobs: repo, issue_number: result.data.number, labels: ['automated pr'] - }); \ No newline at end of file + }); From c5aba355218c911d56348bc1563e406e902f991e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lina=C2=B2?= <20880695+hobgoblina@users.noreply.github.com> Date: Thu, 11 Apr 2024 01:04:34 -0400 Subject: [PATCH 6/9] way better with the PR action --- .github/workflows/update-robots-txt.yml | 80 ++++--------------------- robots-base.txt | 22 +++++++ 2 files changed, 35 insertions(+), 67 deletions(-) create mode 100644 robots-base.txt diff --git a/.github/workflows/update-robots-txt.yml b/.github/workflows/update-robots-txt.yml index 125781d8eaeafe..b2a7928c22466b 100644 --- a/.github/workflows/update-robots-txt.yml +++ b/.github/workflows/update-robots-txt.yml @@ -1,7 +1,5 @@ name: Update robots.txt -permissions: write-all - on: schedule: - cron: '0 0 * * 0' @@ -11,78 +9,26 @@ jobs: update-robots: runs-on: ubuntu-latest steps: - - name: Create Branch - env: - GITHUB_TOKEN: ${{ github.token }} - uses: peterjgrainger/action-create-branch@v2.2.0 - with: - branch: robots.txt-update - name: Checkout uses: actions/checkout@v3 - with: - ref: robots.txt-update - fetch-depth: 0 - name: Update robot.txt id: update env: API_KEY: ${{ secrets.ROBOTS }} run: | - '# _---~~(~~-_. - # _{ ) ) - # , ) -~~- ( ,-' )_ - # ( `-,_..`., )-- '_,) - # ( ` _) ( -~( -_ `, } - # (_- _ ~_-~~~~`, ,' ) - # `~ -^( __;-,((())) - # ~~~~ {_ -_(()) - # `\ } - # { } - # BRAAAAAAAAIIIINNSSSSSSS - - ' >> public/robots.txt + cp robots-base.txt public/robots.txt curl --location 'https://api.darkvisitors.com/robots-txts' \ --header 'Content-Type: application/json' \ - --header 'Authorization: Bearer $API_KEY' \ - --data '{ "agent_types": [ "AI Data Scraper", "AI Assistant", "AI Search Crawler" ], "disallow": "/" }' > public/robots.txt - git add public/robots.txt - changes=$(git push origin 2>&1) - if [ "$changes" = "Everything up-to-date" ]; then - echo "skip=true" >> "$GITHUB_OUTPUT" - fi - - name: Check if PR exists - env: - GH_TOKEN: ${{ github.token }} - id: check - run: | - prs=$(gh pr list \ - --repo "$GITHUB_REPOSITORY" \ - --json baseRefName,headRefName \ - --jq ' - map(select(.baseRefName == "dev" and .headRefName == "robots.txt-update")) - | length - ') - if ((prs > 0)); then - echo "skip=true" >> "$GITHUB_OUTPUT" - fi - - name: Create Pull Request - if: | - !steps.check.outputs.skip && - !steps.update.outputs.skip - uses: actions/github-script@v6 + --header "Authorization: Bearer $API_KEY" \ + --data '{ "agent_types": [ "AI Data Scraper", "AI Assistant", "AI Search Crawler" ], "disallow": "/" }' >> public/robots.txt + - name: Create pull request + uses: peter-evans/create-pull-request@v6 with: - script: | - const { repo, owner } = context.repo; - const result = await github.rest.pulls.create({ - title: 'Update robots.txt', - owner, - repo, - head: 'robots.txt-update', - base: 'dev', - body: 'This PR was *auto-generated* by the `Update robots.txt` action and contains updates to our robots.txt file, pulled from [Dark Visitors](https://darkvisitors.com/).' - }); - github.rest.issues.addLabels({ - owner, - repo, - issue_number: result.data.number, - labels: ['automated pr'] - }); + token: ${{ secrets.GITHUB_TOKEN }} + branch: robots.txt-update + title: "Update robots.txt" + commit-message: "Update robots.txt" + labels: 'robots.txt' + add-paths: public/robots.txt + reviewers: hobgoblina,mannazsci,sneakers-the-rat + body: This PR was generated by the `Update robots.txt` action and contains updates to our robots.txt file, pulled from [Dark Visitors](https://darkvisitors.com/). diff --git a/robots-base.txt b/robots-base.txt new file mode 100644 index 00000000000000..53a70c15660140 --- /dev/null +++ b/robots-base.txt @@ -0,0 +1,22 @@ +# .__---~~~(~~-_. +# _-' ) -~~- ) _-" )_ +# ( ( `-,_..`.,_--_ '_,)_ +# ( -_) ( -_-~ -_ `, ) +# (_ -_ _-~-__-~`, ,' )__-'))--___--~~~--__--~~--___--__.. +# _ ~`_-'( (____;--==,,_))))--___--~~~--__--~~--__----~~~'`=__-~+_-_. +# (@) (@) ````` `-_(())_-~ +# +# ,---. .=-.-..-._ ,-,--. +# _..---. .-.,.---. .--.' \ /==/_ /==/ \ .-._ ,-.'- _\ +# .' .'.-. \ /==/ ` \ \==\-/\ \ |==|, ||==|, \/ /, /==/_ ,_.' +# /==/- '=' /|==|-, .=., |/==/-|_\ | |==| ||==|- \| |\==\ \ +# |==|-, ' |==| '=' /\==\, - \ |==|- ||==| , | -| \==\ -\ +# |==| .=. \|==|- , .' /==/ - ,| |==| ,||==| - _ | _\==\ ,\ +# /==/- '=' ,|==|_ . ,'./==/- /\ - \|==|- ||==| /\ , |/==/\/ _ | +# |==| - //==/ /\ , )==\ _.\=\.-'/==/. //==/, | |- |\==\ - , / +# `-._`.___,' `--`-`--`--' `--` `--`-` `--`./ `--` `--`---' + +User-agent: * +Disallow: /media_proxy/ +Disallow: /interact/ + From 2268fa9e5b5c871a95b723fcf686a8f5857b3894 Mon Sep 17 00:00:00 2001 From: hobgoblina <20880695+hobgoblina@users.noreply.github.com> Date: Thu, 11 Apr 2024 05:23:02 +0000 Subject: [PATCH 7/9] Update robots.txt --- public/robots.txt | 105 ++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 101 insertions(+), 4 deletions(-) diff --git a/public/robots.txt b/public/robots.txt index 6672eeba1f22d7..613c48e6c4c673 100644 --- a/public/robots.txt +++ b/public/robots.txt @@ -1,8 +1,105 @@ -# See http://www.robotstxt.org/robotstxt.html for documentation on how to use the robots.txt file - -User-agent: GPTBot -Disallow: / +# .__---~~~(~~-_. +# _-' ) -~~- ) _-" )_ +# ( ( `-,_..`.,_--_ '_,)_ +# ( -_) ( -_-~ -_ `, ) +# (_ -_ _-~-__-~`, ,' )__-'))--___--~~~--__--~~--___--__.. +# _ ~`_-'( (____;--==,,_))))--___--~~~--__--~~--__----~~~'`=__-~+_-_. +# (@) (@) ````` `-_(())_-~ +# +# ,---. .=-.-..-._ ,-,--. +# _..---. .-.,.---. .--.' \ /==/_ /==/ \ .-._ ,-.'- _\ +# .' .'.-. \ /==/ ` \ \==\-/\ \ |==|, ||==|, \/ /, /==/_ ,_.' +# /==/- '=' /|==|-, .=., |/==/-|_\ | |==| ||==|- \| |\==\ \ +# |==|-, ' |==| '=' /\==\, - \ |==|- ||==| , | -| \==\ -\ +# |==| .=. \|==|- , .' /==/ - ,| |==| ,||==| - _ | _\==\ ,\ +# /==/- '=' ,|==|_ . ,'./==/- /\ - \|==|- ||==| /\ , |/==/\/ _ | +# |==| - //==/ /\ , )==\ _.\=\.-'/==/. //==/, | |- |\==\ - , / +# `-._`.___,' `--`-`--`--' `--` `--`-` `--`./ `--` `--`---' User-agent: * Disallow: /media_proxy/ Disallow: /interact/ + +# AI Search Crawler +# https://darkvisitors.com/agents/amazonbot + +User-agent: Amazonbot +Disallow: / + +# AI Data Scraper +# https://darkvisitors.com/agents/anthropic-ai + +User-agent: anthropic-ai +Disallow: / + +# AI Search Crawler +# https://darkvisitors.com/agents/applebot + +User-agent: Applebot +Disallow: / + +# AI Data Scraper +# https://darkvisitors.com/agents/bytespider + +User-agent: Bytespider +Disallow: / + +# AI Data Scraper +# https://darkvisitors.com/agents/ccbot + +User-agent: CCBot +Disallow: / + +# AI Assistant +# https://darkvisitors.com/agents/chatgpt-user + +User-agent: ChatGPT-User +Disallow: / + +# AI Assistant +# https://darkvisitors.com/agents/cohere-ai + +User-agent: cohere-ai +Disallow: / + +# AI Data Scraper +# https://darkvisitors.com/agents/diffbot + +User-agent: Diffbot +Disallow: / + +# AI Data Scraper +# https://darkvisitors.com/agents/facebookbot + +User-agent: FacebookBot +Disallow: / + +# AI Data Scraper +# https://darkvisitors.com/agents/google-extended + +User-agent: Google-Extended +Disallow: / + +# AI Data Scraper +# https://darkvisitors.com/agents/gptbot + +User-agent: GPTBot +Disallow: / + +# AI Data Scraper +# https://darkvisitors.com/agents/omgili + +User-agent: omgili +Disallow: / + +# AI Search Crawler +# https://darkvisitors.com/agents/perplexitybot + +User-agent: PerplexityBot +Disallow: / + +# AI Search Crawler +# https://darkvisitors.com/agents/youbot + +User-agent: YouBot +Disallow: / \ No newline at end of file From 0ad7eef952932351a778c6445d94a984e501146d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lina=C2=B2?= <20880695+hobgoblina@users.noreply.github.com> Date: Tue, 7 May 2024 13:58:47 -0400 Subject: [PATCH 8/9] add `Undocumented AI Agent` agent type to Dark Visitors API call --- .github/workflows/update-robots-txt.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/update-robots-txt.yml b/.github/workflows/update-robots-txt.yml index b2a7928c22466b..64c3d23a93cae7 100644 --- a/.github/workflows/update-robots-txt.yml +++ b/.github/workflows/update-robots-txt.yml @@ -20,7 +20,7 @@ jobs: curl --location 'https://api.darkvisitors.com/robots-txts' \ --header 'Content-Type: application/json' \ --header "Authorization: Bearer $API_KEY" \ - --data '{ "agent_types": [ "AI Data Scraper", "AI Assistant", "AI Search Crawler" ], "disallow": "/" }' >> public/robots.txt + --data '{ "agent_types": [ "AI Data Scraper", "AI Assistant", "AI Search Crawler", "Undocumented AI Agent" ], "disallow": "/" }' >> public/robots.txt - name: Create pull request uses: peter-evans/create-pull-request@v6 with: From b0b689bc1d24c63c50e6a9d4ffc97b19cb6fd259 Mon Sep 17 00:00:00 2001 From: hobgoblina <20880695+hobgoblina@users.noreply.github.com> Date: Sun, 12 May 2024 00:15:25 +0000 Subject: [PATCH 9/9] Update robots.txt --- public/robots.txt | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/public/robots.txt b/public/robots.txt index 613c48e6c4c673..a955b370f20618 100644 --- a/public/robots.txt +++ b/public/robots.txt @@ -26,7 +26,7 @@ Disallow: /interact/ User-agent: Amazonbot Disallow: / -# AI Data Scraper +# Undocumented AI Agent # https://darkvisitors.com/agents/anthropic-ai User-agent: anthropic-ai @@ -56,7 +56,19 @@ Disallow: / User-agent: ChatGPT-User Disallow: / -# AI Assistant +# Undocumented AI Agent +# https://darkvisitors.com/agents/claude-web + +User-agent: Claude-Web +Disallow: / + +# AI Data Scraper +# https://darkvisitors.com/agents/claudebot + +User-agent: ClaudeBot +Disallow: / + +# Undocumented AI Agent # https://darkvisitors.com/agents/cohere-ai User-agent: cohere-ai