mirror of
https://github.com/seigler/dash-docs
synced 2025-07-27 01:36:13 +00:00
Enable use of "use strict" and fix two global variable declarations
This commit is contained in:
parent
3ac6158d37
commit
1bd4720304
5 changed files with 13 additions and 1 deletions
|
@ -4,6 +4,8 @@
|
||||||
// This file should be used only for javascript code
|
// This file should be used only for javascript code
|
||||||
// necessary for all pages to work properly.
|
// necessary for all pages to work properly.
|
||||||
|
|
||||||
|
"use strict"
|
||||||
|
|
||||||
function addEvent(a, b, c) {
|
function addEvent(a, b, c) {
|
||||||
// Attach event to a DOM node.
|
// Attach event to a DOM node.
|
||||||
// Ex. addEvent(node,'click',function);
|
// Ex. addEvent(node,'click',function);
|
||||||
|
|
|
@ -19,6 +19,8 @@ Nested loops below:
|
||||||
|
|
||||||
{% endcomment %}
|
{% endcomment %}
|
||||||
|
|
||||||
|
"use strict"
|
||||||
|
|
||||||
var search_data = [
|
var search_data = [
|
||||||
{% for list in site.devsearches %}{% for item in list %}
|
{% for list in site.devsearches %}{% for item in list %}
|
||||||
{% if forloop.first %}{% capture category_name %}{{item}}{% endcapture %}
|
{% if forloop.first %}{% capture category_name %}{{item}}{% endcapture %}
|
||||||
|
|
|
@ -1,6 +1,9 @@
|
||||||
---
|
---
|
||||||
layout: null
|
layout: null
|
||||||
---
|
---
|
||||||
|
|
||||||
|
"use strict"
|
||||||
|
|
||||||
var zoom=2;
|
var zoom=2;
|
||||||
var minzoom=1;
|
var minzoom=1;
|
||||||
if(isMobile())var zoom=minzoom=0;
|
if(isMobile())var zoom=minzoom=0;
|
||||||
|
|
4
js/ie.js
4
js/ie.js
|
@ -1,6 +1,8 @@
|
||||||
// This file is licensed under the MIT License (MIT) available on
|
// This file is licensed under the MIT License (MIT) available on
|
||||||
// http://opensource.org/licenses/MIT.
|
// http://opensource.org/licenses/MIT.
|
||||||
|
|
||||||
|
"use strict"
|
||||||
|
|
||||||
function pngfix(){
|
function pngfix(){
|
||||||
//Allows IE6 to render transparent png
|
//Allows IE6 to render transparent png
|
||||||
var arVersion = navigator.appVersion.split("MSIE")
|
var arVersion = navigator.appVersion.split("MSIE")
|
||||||
|
@ -38,7 +40,7 @@ if ((version >= 5.5) && (document.body.filters))
|
||||||
}
|
}
|
||||||
|
|
||||||
//Let other scripts know browser is IE6-7
|
//Let other scripts know browser is IE6-7
|
||||||
legacyIE=true;
|
var legacyIE=true;
|
||||||
|
|
||||||
//Render all transparent pngs
|
//Render all transparent pngs
|
||||||
window.onload=pngfix;
|
window.onload=pngfix;
|
||||||
|
|
|
@ -4,6 +4,8 @@
|
||||||
// This file is used for javascript code
|
// This file is used for javascript code
|
||||||
// necessary for some pages to work properly.
|
// necessary for some pages to work properly.
|
||||||
|
|
||||||
|
"use strict"
|
||||||
|
|
||||||
function getWidth(a) {
|
function getWidth(a) {
|
||||||
// Return the integer value of the computed width of a DOM node.
|
// Return the integer value of the computed width of a DOM node.
|
||||||
// Ex. getWidth(node);
|
// Ex. getWidth(node);
|
||||||
|
@ -189,6 +191,7 @@ function updateToc() {
|
||||||
var pageoffset;
|
var pageoffset;
|
||||||
var windowy;
|
var windowy;
|
||||||
var toc;
|
var toc;
|
||||||
|
var fallback;
|
||||||
var first;
|
var first;
|
||||||
var last;
|
var last;
|
||||||
var closer;
|
var closer;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue