Jump to content

Topic on Extension talk:MassEditRegex

Adding content to the very top of every page

2
Kghbln (talkcontribs)

The extension provides examples for adding content to the very bottom of a page, but not to the top. Thus I fiddled with regexes a bit and found this solution, e.g.:

Detect any first character at the beginning of a page:

ā†’ Search for: /^(.)/

Prepend my content to the char found a the beginning of a page including a line break:

ā†’ Replace with: MyContent\n$1

Dinoguy1000 (talkcontribs)

IDK if you tested this, but working just from regex (since I've never used this extension and it might behave differently than expected), the match fragment /^/ should work, with replacement MyContent\n.

Reply to "Adding content to the very top of every page"