Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

xfd: check "Wrap deletion tag with <noinclude>" if page carries {{sub… #639

Merged
merged 1 commit into from May 30, 2019

Conversation

siddharthvp
Copy link
Member

Check "Wrap deletion tag with " by default if template page (or its documentation) carries {{subst only}}.

@siddharthvp
Copy link
Member Author

Note: This will only work after the template has been edited to add |name = Subst only. I can't do it coz of TE-protection.

@JJMC89
Copy link
Contributor

JJMC89 commented May 20, 2019

template has been edited to add |name = Subst only

Done

@@ -320,7 +320,8 @@ Twinkle.xfd.callback.change_category = function twinklexfdCallbackChangeCategory
value: 'noinclude',
name: 'noinclude',
tooltip: 'Will wrap the deletion tag in &lt;noinclude&gt; tags, so that it won\'t get substituted along with the template.',
disabled: templateOrModule === 'module'
disabled: templateOrModule === 'module',
checked: !!$('.box-Subst_only').length // Default to checked if page carries {{subst only}}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I haven't thought too deeply about it, but why is !! necessary, does $('.box-Subst_only').length not work?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Type-correctness. It'd work without !! too.

@Amorymeltzer Amorymeltzer merged commit b16549a into wikimedia-gadgets:master May 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants