Skip to content

Commit

Permalink
Merge pull request #3 from Ne4to777/mol-to-habhub-redirection
Browse files Browse the repository at this point in the history
Редиректить с mol.hyoo.ru на habhub.hyoo.ru, если  section это articles
  • Loading branch information
nin-jin authored Jun 9, 2023
2 parents a2cf63a + 2ddb633 commit 550b4f4
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions mol.view.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
namespace $.$$ {
export class $hyoo_mol extends $.$hyoo_mol {

@$mol_mem
hubhabRedirect() {
if (this.$.$mol_state_arg.value('section') === 'articles') {
document.location.assign('https://habhub.hyoo.ru/' + document.location.hash)
}
}

auto() {
this.hubhabRedirect()
}

Placeholder() {
if( this.spread() === 'docs' ) return this.Docs().Placeholder()
Expand Down

0 comments on commit 550b4f4

Please sign in to comment.