[TemporaryStorage] add files required for SDK build
[samples/web/TemporaryStorage.git] / tizen-web-ui-fw / latest / js / src / jquery.tag.inserter.js
1 (function() {
2         // Insert a script tag pointing at the desired version of jQuery
3
4         // Get the version from the url
5         var jqueryRE = /[\\?&]jquery=([^&#]*)/,
6                 results = jqueryRE.exec( location.search ),
7                 version = "",
8                 myScriptTag = document.getElementsByTagName( "script" )[document.getElementsByTagName( "script" ).length - 1],
9                 baseUrl = myScriptTag.src.replace( /(.*)\/.*$/, "$1/" ),
10                 url = baseUrl + "jquery.js";
11
12         if ( results ) {
13                 version = decodeURIComponent(results[results.length - 1].replace(/\+/g, " "));
14                 url = "http://code.jquery.com/jquery-"+version+".js";
15         }
16
17         document.write( "<script src='" + url + "'></script>" );
18
19         document.write(
20                 '<script>' +
21                         'if ( parseInt( jQuery.fn.jquery.replace( /\\./g, "" ), 10 ) < 170 && window.define && window.define.amd ) {' +
22                             'define( "jquery", [], function () { return jQuery; } );'+
23                         '}'+
24                 '</script>'
25         );
26 }());