Skip to content

Commit

Permalink
Split getNFunction into two functions
Browse files Browse the repository at this point in the history
  • Loading branch information
corny committed Sep 19, 2022
1 parent 73e51fb commit 7a96dfe
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions decipher.go
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,11 @@ func (config playerConfig) getNFunction() (string, error) {
name = string(nameResult[1])
}

return config.extraFunction(name)

}

func (config playerConfig) extraFunction(name string) (string, error) {
// find the beginning of the function
def := []byte(name + "=function(")
start := bytes.Index(config, def)
Expand Down

0 comments on commit 7a96dfe

Please sign in to comment.