-$(document).ready(function() {
- current_url = window.location.href
- if (current_url.match("&closewin=true")) {
- window.close();
- }
+var $ = global.jquery = require('jquery');
+
+$(document).ready(function () {
+ var currentUrl = window.location.href;
+ if (currentUrl.match('&closewin=true')) {
+ window.close();
+ }
});