Skip to content

Commit

Permalink
Fix Cast been returned as undefined
Browse files Browse the repository at this point in the history
  • Loading branch information
toshski committed Aug 2, 2024
1 parent 2f4d462 commit 27ec45a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions pkg/scrape/navr.go
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ func NaughtyAmericaVR(wg *sync.WaitGroup, updateSite bool, knownScenes []string,
vm := otto.New()

script := e.Text
script = strings.ReplaceAll(script, "nanalytics.trackExperiment('scene_page_viewed', 'streaming_option_join_button');", "")
script = strings.Replace(script, "window.dataLayer", "dataLayer", -1)
script = strings.Replace(script, "dataLayer = dataLayer || []", "dataLayer = []", -1)
script = script + "\nout = []; dataLayer.forEach(function(v) { if (v.femaleStar) { out.push(v.femaleStar); } });"
Expand Down

0 comments on commit 27ec45a

Please sign in to comment.