Skip to content

Instantly share code, notes, and snippets.

@BrunoSpy
Created April 29, 2017 07:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save BrunoSpy/6581f106a15f5d830f3e2289002da2f5 to your computer and use it in GitHub Desktop.
Save BrunoSpy/6581f106a15f5d830f3e2289002da2f5 to your computer and use it in GitHub Desktop.
Change the character limit of your Mastodon instance (example with 666)
storybook/stories/character_counter.story.jsx
Change line 7 :
From : return <CharacterCounter text={text} max="500" />;
To : return <CharacterCounter text={text} max="666" />;
Change line 11 :
From : return <CharacterCounter text={text} max="500" />;
To : return <CharacterCounter text={text} max="666" />;
app/assets/javascripts/components/features/compose/components/compose_form.jsx :
Change line 177 :
From : <div className='compose-form__publish-button-wrapper'><Button text={publishText} onClick={this.handleSubmit} disabled={disabled || text.replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g, "_").length > 500 || (text.length !==0 && text.trim().length === 0)} block /></div>
To : <div className='compose-form__publish-button-wrapper'><Button text={publishText} onClick={this.handleSubmit} disabled={disabled || text.replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g, "_").length > 666 || (text.length !==0 && text.trim().length === 0)} block /></div>
Change line 200
From : <div style={{ paddingTop: '10px', marginRight: '16px', lineHeight: '36px' }}><CharacterCounter max={500} text={[this.props.spoiler_text, this.props.text].join('')} /></div>
 To : <div style={{ paddingTop: '10px', marginRight: '16px', lineHeight: '36px' }}><CharacterCounter max={666} text={[this.props.spoiler_text, this.props.text].join('')} /></div>
app/validators/status_length_validator.rb
Change line 4 :
From : MAX_CHARS = 500
To : MAX_CHARS = 666
@Shreewebs
Copy link

Shreewebs commented Sep 6, 2018

Hii, Editing these files does not seem to work anymore, could you please suggest any other mode to change Toot character limit to 600

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment