* Optimize addReadmeButtons
* shorten selectors
* avoid unnecessary operations
* skip jQuery
* get user content out of innerHTML (XSS)
* various code shortcuts
* Remove edit button on tags and commits
* Correctly detect real unread notifications
* Move all mark-unread setup into its own file
* Clarify function names
* Use untouched attribute to detect real notifications
* Keep icon on when the last real notification is marked as read
* Move any repos groups with local unread items to the top
Sourcemaps can be enabled by either setting the `SOURCEMAP` environment variable
to `true` (works for `npm run build` too) or running `npm run watch:sourcemap`
* mark-unread: DRY localStorage loading/storing
* mark-unread: less and cleaner jQuery
* mark-unread: update UI after the action
So any throwing error will be instantly visible.
* Correctly linkify repeating URLs on the same line
* Rework linkifyURLsInCode
Before:
* Its code was spread between utils, content and its own file
* Matching was run three times (.test, .match, .replace)
* The linkifier was only half-DRYed
Now:
* The replacer can run on new elements, it won’t stop if it finds any
previously-linkified elements
* The replacer is tested on elements
* Use sindresorhus/linkify-urls and sindresorhus/linkify-issues
* Fix escaping issue in title
Fixes#478
* Use sindresorhus/linkify-issues correctly
* Update linkify-urls
* Limit URL parsing to text nodes
* Avoid DOM writes if there are no changes
* DRY
* Skip textNodes that are too short to contain URLs
Which is approximately 90% on a diff page.
Tested with:
if (textNode.textContent.length < 11) { // Shortest url: http://j.mp
console.count('skipped')
continue;
}
console.count('ok')
* Use for-of instead of .forEach
* Drop tagged template support in html()