polykai.theme

A dark color scheme for coding

Created by Adam Graham > View on GitHub

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

// Cross-browser xml parsing

var parseXML = function( data ) {

  var xml, tmp;

  if ( !data || typeof data !== "string" ) {

    return null;

  }

  try {

    if ( window.DOMParser ) { // Standard

      tmp = new DOMParser();

      xml = tmp.parseFromString( data, "text/xml" );

    } else { // IE

      xml = new ActiveXObject( "Microsoft.XMLDOM" );

      xml.async = false;

      xml.loadXML( data );

    }

  } catch( e ) {

    xml = undefined;

  }

  if ( !xml || !xml.documentElement || xml.getElementsByTagName( "parsererror" ).length ) {

    jQuery.error( "Invalid XML: " + data );

  }

  return xml;

};

 

Sound.play = function() {}

Sound.prototype = { something; }

Sound.prototype.play = function() {}

Sound.prototype.play = myfunc

 

var parser = document.createElement('a');

parser.href = "http://example.com:3000/pathname/?search=test#hash";

parser.hostname; // => "example.com"