-
Notifications
You must be signed in to change notification settings - Fork 6
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
morebits: Add addMaintenanceTag #215
base: master
Are you sure you want to change the base?
Conversation
equals += '='; | ||
} | ||
ctx.pageText = "require('Module:Module wikitext')._addText([" + equals + '[' + tag + ']' + equals + ']);\n' + ctx.pageText; | ||
} else if (['javascript', 'css', 'sanitized-css'].indexOf(ctx.contentModel) !== -1) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
要是內容模型是text好像也可以這樣加
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
我不確定你講的 1. text是否指wikitext 2. 是否指wikitext可同javascript處理,但總之我覺得不行。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
指的是 https://w.wiki/3R8U 的內容模組 "text"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
見此 https://zh.wikipedia.org/wiki/User:A2569875/FakeText.txt
頁面內容模型 : 純文字
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
建議讓其格式為 /* _addText : "tag" */ 以顯示模板。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
我想等方針正式通過再根據方針處理,以免又有什麼變動。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1304e84
to
2dd1fa1
Compare
在
Morebits.wiki.page
下新增該函數能根據內容模型自動添加模板。測試此函數: