Here’s a simple trick to extracting HTTP GET style parameters from a <script> tag, from within the script itself.
At Heyzap, we create a variety of games widgets that publishers can embed on their sites to instantly get great game content. Publishers can choose which games appear on their widget by supplying a custom “embed key” to the widget.
It would be much nicer, however, to be able to do this in one line:
This way we’d be able give publishers only one line to copy and paste into their site, rather than four.
Shut up and show me some code…
About the Author
James Smith, British entrepreneur and developer based in San Francisco.