(bar)
| 12048 | |
| 12049 | var targetY = -1; |
| 12050 | function scrollToPageBar(bar) { |
| 12051 | if (window.pageYOffset == 0) { |
| 12052 | bar.scrollIntoView({ behavior: "smooth", block: "start", inline: "nearest" }); |
| 12053 | } else { |
| 12054 | let yOffset = -20; |
| 12055 | if (typeof ruleParser.curSiteRule.pageBarTop !== 'undefined') { |
| 12056 | yOffset = -ruleParser.curSiteRule.pageBarTop; |
| 12057 | } |
| 12058 | targetY = bar.getBoundingClientRect().top + window.pageYOffset + yOffset; |
| 12059 | window.scrollTo({ top: targetY, behavior: 'smooth'}); |
| 12060 | } |
| 12061 | } |
| 12062 | |
| 12063 | const pageNumReg=/[&\/\?](p=|page[=\/_-]?)\d+|[_-]\d+\./; |
| 12064 | function createPageBar(url) { |
no outgoing calls
no test coverage detected