Skip to content

Commit

Permalink
Merge pull request #996 from Davilarek/patch-1
Browse files Browse the repository at this point in the history
Translate bstlar.com bypass to MV3
  • Loading branch information
0xc60f authored May 19, 2023
2 parents 3a356bd + 859376e commit 17458d0
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions src/bypasses/bstlar.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import BypassDefinition from './BypassDefinition.js'

export default class Bstlar extends BypassDefinition {
constructor() {
super()
// custom bypass required bases can be set here
}

execute() {
this.helpers.ensureDomLoaded(() => {
const boostellar_link = encodeURIComponent(location.pathname.slice(1))
fetch(`https://bstlar.com/api/link?url=${boostellar_link}`).then(res => res.json().then((res) => {
if (res?.link?.destination_url) {
this.helpers.safelyNavigate(res.link.destination_url)
}
}))
})
}
}

export const matches = ['bstlar.com']

0 comments on commit 17458d0

Please sign in to comment.