|
@@ -1,20 +1,12 @@
|
|
<!-- Licensed under a BSD license. See license.html for license -->
|
|
<!-- Licensed under a BSD license. See license.html for license -->
|
|
-(function($){
|
|
|
|
-var log = function(msg) {
|
|
|
|
- return;
|
|
|
|
- if (window.dump) {
|
|
|
|
- dump(msg + "\n");
|
|
|
|
- }
|
|
|
|
- if (window.console && window.console.log) {
|
|
|
|
- console.log(msg);
|
|
|
|
- }
|
|
|
|
-};
|
|
|
|
|
|
+'use strict';
|
|
|
|
|
|
|
|
+(function($){
|
|
function getQueryParams() {
|
|
function getQueryParams() {
|
|
- var params = {};
|
|
|
|
|
|
+ const params = {};
|
|
if (window.location.search) {
|
|
if (window.location.search) {
|
|
- window.location.search.substring(1).split("&").forEach(function(pair) {
|
|
|
|
- var keyValue = pair.split("=").map(function (kv) {
|
|
|
|
|
|
+ window.location.search.substring(1).split('&').forEach(function(pair) {
|
|
|
|
+ const keyValue = pair.split('=').map(function(kv) {
|
|
return decodeURIComponent(kv);
|
|
return decodeURIComponent(kv);
|
|
});
|
|
});
|
|
params[keyValue[0]] = keyValue[1];
|
|
params[keyValue[0]] = keyValue[1];
|
|
@@ -24,10 +16,8 @@ function getQueryParams() {
|
|
}
|
|
}
|
|
|
|
|
|
$(document).ready(function($){
|
|
$(document).ready(function($){
|
|
- var g_imgs = { };
|
|
|
|
var linkImgs = function(bigHref) {
|
|
var linkImgs = function(bigHref) {
|
|
return function() {
|
|
return function() {
|
|
- var src = this.src;
|
|
|
|
var a = document.createElement('a');
|
|
var a = document.createElement('a');
|
|
a.href = bigHref;
|
|
a.href = bigHref;
|
|
a.title = this.alt;
|
|
a.title = this.alt;
|
|
@@ -35,7 +25,7 @@ $(document).ready(function($){
|
|
a.setAttribute('align', this.align);
|
|
a.setAttribute('align', this.align);
|
|
this.setAttribute('align', '');
|
|
this.setAttribute('align', '');
|
|
this.className = '';
|
|
this.className = '';
|
|
- this.style.border = "0px";
|
|
|
|
|
|
+ this.style.border = '0px';
|
|
return a;
|
|
return a;
|
|
};
|
|
};
|
|
};
|
|
};
|
|
@@ -46,28 +36,28 @@ $(document).ready(function($){
|
|
};
|
|
};
|
|
};
|
|
};
|
|
var linkBigImgs = function() {
|
|
var linkBigImgs = function() {
|
|
- var src = $(this).attr("big");
|
|
|
|
|
|
+ var src = $(this).attr('big');
|
|
return linkImgs(src);
|
|
return linkImgs(src);
|
|
};
|
|
};
|
|
$('img[big$=".jpg"]').wrap(linkBigImgs);
|
|
$('img[big$=".jpg"]').wrap(linkBigImgs);
|
|
- $('img[src$="-sm.jpg"]').wrap(linkSmallImgs(".jpg"));
|
|
|
|
- $('img[src$="-sm.gif"]').wrap(linkSmallImgs(".gif"));
|
|
|
|
- $('img[src$="-sm.png"]').wrap(linkSmallImgs(".png"));
|
|
|
|
|
|
+ $('img[src$="-sm.jpg"]').wrap(linkSmallImgs('.jpg'));
|
|
|
|
+ $('img[src$="-sm.gif"]').wrap(linkSmallImgs('.gif'));
|
|
|
|
+ $('img[src$="-sm.png"]').wrap(linkSmallImgs('.png'));
|
|
$('pre>code')
|
|
$('pre>code')
|
|
- .unwrap()
|
|
|
|
- .replaceWith(function() {
|
|
|
|
- return $('<pre class="prettyprint showlinemods">' + this.innerHTML + '</pre>')
|
|
|
|
- });
|
|
|
|
|
|
+ .unwrap()
|
|
|
|
+ .replaceWith(function() {
|
|
|
|
+ return $('<pre class="prettyprint showlinemods">' + this.innerHTML + '</pre>');
|
|
|
|
+ });
|
|
if (window.prettyPrint) {
|
|
if (window.prettyPrint) {
|
|
window.prettyPrint();
|
|
window.prettyPrint();
|
|
}
|
|
}
|
|
|
|
|
|
var params = getQueryParams();
|
|
var params = getQueryParams();
|
|
if (params.doubleSpace || params.doublespace) {
|
|
if (params.doubleSpace || params.doublespace) {
|
|
- document.body.className = document.body.className + " doubleSpace";
|
|
|
|
|
|
+ document.body.className = document.body.className + ' doubleSpace';
|
|
}
|
|
}
|
|
|
|
|
|
- $(".language").on('change', function() {
|
|
|
|
|
|
+ $('.language').on('change', function() {
|
|
window.location.href = this.value;
|
|
window.location.href = this.value;
|
|
});
|
|
});
|
|
|
|
|