Created
April 29, 2017 07:33
-
-
Save BrunoSpy/6581f106a15f5d830f3e2289002da2f5 to your computer and use it in GitHub Desktop.
Change the character limit of your Mastodon instance (example with 666)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" />; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> | |
 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
app/validators/status_length_validator.rb | |
Change line 4 : | |
From : MAX_CHARS = 500 | |
To : MAX_CHARS = 666 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hii, Editing these files does not seem to work anymore, could you please suggest any other mode to change Toot character limit to 600