Permalink
Browse files

fixed xss vulnerability in docs

  • Loading branch information...
1 parent a4cbf37 commit c202878fcfdc9de73d5ad1d8de02ef15edac0408 @janpaepke committed Jan 6, 2016
@@ -102,7 +102,11 @@
<script>
function openDeeplinkedElement (skipAni) {
- $("dt h4.member-collapsed[id='" + window.location.hash.substring(1).replace(":", "\\:") +"']").trigger("click", skipAni);
+ try {
+ $("dt h4.member-collapsed").filter(window.location.hash.substring(1).replace(":", "\\:")).trigger("click", skipAni);
+ } catch (e) {
+ console.warn("ah ah ah! :p");
+ }
}
$( function () {
$( "#toc" ).toc( {
@@ -630,7 +630,7 @@ <h4 class="name" id="addScene"><span class="type-signature"></span>addScene<span
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
- <a href="ScrollMagic_Controller.js.html">ScrollMagic/Controller.js</a>, <a href="ScrollMagic_Controller.js.html#sunlight-1-line-286">line 286</a>
+ <a href="ScrollMagic_Controller.js.html">ScrollMagic/Controller.js</a>, <a href="ScrollMagic_Controller.js.html#sunlight-1-line-287">line 287</a>
</li></ul></dd>
@@ -789,7 +789,7 @@ <h4 class="name" id="destroy"><span class="type-signature"></span>destroy<span c
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
- <a href="ScrollMagic_Controller.js.html">ScrollMagic/Controller.js</a>, <a href="ScrollMagic_Controller.js.html#sunlight-1-line-657">line 657</a>
+ <a href="ScrollMagic_Controller.js.html">ScrollMagic/Controller.js</a>, <a href="ScrollMagic_Controller.js.html#sunlight-1-line-658">line 658</a>
</li></ul></dd>
@@ -931,7 +931,7 @@ <h4 class="name" id="removeScene"><span class="type-signature"></span>removeScen
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
- <a href="ScrollMagic_Controller.js.html">ScrollMagic/Controller.js</a>, <a href="ScrollMagic_Controller.js.html#sunlight-1-line-329">line 329</a>
+ <a href="ScrollMagic_Controller.js.html">ScrollMagic/Controller.js</a>, <a href="ScrollMagic_Controller.js.html#sunlight-1-line-330">line 330</a>
</li></ul></dd>
@@ -1122,7 +1122,7 @@ <h4 class="name" id="scrollTo"><span class="type-signature"></span>scrollTo<span
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
- <a href="ScrollMagic_Controller.js.html">ScrollMagic/Controller.js</a>, <a href="ScrollMagic_Controller.js.html#sunlight-1-line-476">line 476</a>
+ <a href="ScrollMagic_Controller.js.html">ScrollMagic/Controller.js</a>, <a href="ScrollMagic_Controller.js.html#sunlight-1-line-477">line 477</a>
</li></ul></dd>
@@ -1282,7 +1282,7 @@ <h4 class="name" id="update"><span class="type-signature"></span>update<span cla
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
- <a href="ScrollMagic_Controller.js.html">ScrollMagic/Controller.js</a>, <a href="ScrollMagic_Controller.js.html#sunlight-1-line-407">line 407</a>
+ <a href="ScrollMagic_Controller.js.html">ScrollMagic/Controller.js</a>, <a href="ScrollMagic_Controller.js.html#sunlight-1-line-408">line 408</a>
</li></ul></dd>
@@ -1476,7 +1476,7 @@ <h4 class="name" id="updateScene"><span class="type-signature"></span>updateScen
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
- <a href="ScrollMagic_Controller.js.html">ScrollMagic/Controller.js</a>, <a href="ScrollMagic_Controller.js.html#sunlight-1-line-368">line 368</a>
+ <a href="ScrollMagic_Controller.js.html">ScrollMagic/Controller.js</a>, <a href="ScrollMagic_Controller.js.html#sunlight-1-line-369">line 369</a>
</li></ul></dd>
@@ -1631,7 +1631,7 @@ <h4 class="name" id="enabled"><span class="type-signature"></span>enabled<span c
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
- <a href="ScrollMagic_Controller.js.html">ScrollMagic/Controller.js</a>, <a href="ScrollMagic_Controller.js.html#sunlight-1-line-633">line 633</a>
+ <a href="ScrollMagic_Controller.js.html">ScrollMagic/Controller.js</a>, <a href="ScrollMagic_Controller.js.html#sunlight-1-line-634">line 634</a>
</li></ul></dd>
@@ -1785,7 +1785,7 @@ <h4 class="name" id="loglevel"><span class="type-signature"></span>loglevel<span
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
- <a href="ScrollMagic_Controller.js.html">ScrollMagic/Controller.js</a>, <a href="ScrollMagic_Controller.js.html#sunlight-1-line-607">line 607</a>
+ <a href="ScrollMagic_Controller.js.html">ScrollMagic/Controller.js</a>, <a href="ScrollMagic_Controller.js.html#sunlight-1-line-608">line 608</a>
</li></ul></dd>
@@ -1943,7 +1943,7 @@ <h4 class="name" id="scrollPos"><span class="type-signature"></span>scrollPos<sp
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
- <a href="ScrollMagic_Controller.js.html">ScrollMagic/Controller.js</a>, <a href="ScrollMagic_Controller.js.html#sunlight-1-line-541">line 541</a>
+ <a href="ScrollMagic_Controller.js.html">ScrollMagic/Controller.js</a>, <a href="ScrollMagic_Controller.js.html#sunlight-1-line-542">line 542</a>
</li></ul></dd>
@@ -2109,7 +2109,7 @@ <h4 class="name" id="info"><span class="type-signature"></span>info<span class="
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
- <a href="ScrollMagic_Controller.js.html">ScrollMagic/Controller.js</a>, <a href="ScrollMagic_Controller.js.html#sunlight-1-line-574">line 574</a>
+ <a href="ScrollMagic_Controller.js.html">ScrollMagic/Controller.js</a>, <a href="ScrollMagic_Controller.js.html#sunlight-1-line-575">line 575</a>
</li></ul></dd>
@@ -2214,7 +2214,11 @@ <h4 class="name" id="info"><span class="type-signature"></span>info<span class="
<script>
function openDeeplinkedElement (skipAni) {
- $("dt h4.member-collapsed[id='" + window.location.hash.substring(1).replace(":", "\\:") +"']").trigger("click", skipAni);
+ try {
+ $("dt h4.member-collapsed").filter(window.location.hash.substring(1).replace(":", "\\:")).trigger("click", skipAni);
+ } catch (e) {
+ console.warn("ah ah ah! :p");
+ }
}
$( function () {
$( "#toc" ).toc( {
@@ -7210,7 +7210,11 @@ <h5 class="subsection-title">Properties:</h5>
<script>
function openDeeplinkedElement (skipAni) {
- $("dt h4.member-collapsed[id='" + window.location.hash.substring(1).replace(":", "\\:") +"']").trigger("click", skipAni);
+ try {
+ $("dt h4.member-collapsed").filter(window.location.hash.substring(1).replace(":", "\\:")).trigger("click", skipAni);
+ } catch (e) {
+ console.warn("ah ah ah! :p");
+ }
}
$( function () {
$( "#toc" ).toc( {
@@ -265,7 +265,11 @@ <h3 class="subsection-title">Classes</h3>
<script>
function openDeeplinkedElement (skipAni) {
- $("dt h4.member-collapsed[id='" + window.location.hash.substring(1).replace(":", "\\:") +"']").trigger("click", skipAni);
+ try {
+ $("dt h4.member-collapsed").filter(window.location.hash.substring(1).replace(":", "\\:")).trigger("click", skipAni);
+ } catch (e) {
+ console.warn("ah ah ah! :p");
+ }
}
$( function () {
$( "#toc" ).toc( {
@@ -231,7 +231,11 @@ <h1 class="page-title">Source: ScrollMagic.js</h1>
<script>
function openDeeplinkedElement (skipAni) {
- $("dt h4.member-collapsed[id='" + window.location.hash.substring(1).replace(":", "\\:") +"']").trigger("click", skipAni);
+ try {
+ $("dt h4.member-collapsed").filter(window.location.hash.substring(1).replace(":", "\\:")).trigger("click", skipAni);
+ } catch (e) {
+ console.warn("ah ah ah! :p");
+ }
}
$( function () {
$( "#toc" ).toc( {
@@ -232,7 +232,8 @@ <h1 class="page-title">Source: ScrollMagic/Controller.js</h1>
_options.container.addEventListener("resize", onChange);
_options.container.addEventListener("scroll", onChange);
- _options.refreshInterval = parseInt(_options.refreshInterval) || DEFAULT_OPTIONS.refreshInterval;
+ var ri = parseInt(_options.refreshInterval, 10);
+ _options.refreshInterval = _util.type.Number(ri) ? ri : DEFAULT_OPTIONS.refreshInterval;
scheduleRefresh();
log(3, "added new " + NAMESPACE + " controller (v" + ScrollMagic.version + ")");
@@ -863,7 +864,11 @@ <h1 class="page-title">Source: ScrollMagic/Controller.js</h1>
<script>
function openDeeplinkedElement (skipAni) {
- $("dt h4.member-collapsed[id='" + window.location.hash.substring(1).replace(":", "\\:") +"']").trigger("click", skipAni);
+ try {
+ $("dt h4.member-collapsed").filter(window.location.hash.substring(1).replace(":", "\\:")).trigger("click", skipAni);
+ } catch (e) {
+ console.warn("ah ah ah! :p");
+ }
}
$( function () {
$( "#toc" ).toc( {
@@ -296,7 +296,11 @@ <h1 class="page-title">Source: ScrollMagic/Scene.js</h1>
<script>
function openDeeplinkedElement (skipAni) {
- $("dt h4.member-collapsed[id='" + window.location.hash.substring(1).replace(":", "\\:") +"']").trigger("click", skipAni);
+ try {
+ $("dt h4.member-collapsed").filter(window.location.hash.substring(1).replace(":", "\\:")).trigger("click", skipAni);
+ } catch (e) {
+ console.warn("ah ah ah! :p");
+ }
}
$( function () {
$( "#toc" ).toc( {
@@ -509,7 +509,11 @@ <h1 class="page-title">Source: ScrollMagic/Scene/core.js</h1>
<script>
function openDeeplinkedElement (skipAni) {
- $("dt h4.member-collapsed[id='" + window.location.hash.substring(1).replace(":", "\\:") +"']").trigger("click", skipAni);
+ try {
+ $("dt h4.member-collapsed").filter(window.location.hash.substring(1).replace(":", "\\:")).trigger("click", skipAni);
+ } catch (e) {
+ console.warn("ah ah ah! :p");
+ }
}
$( function () {
$( "#toc" ).toc( {
@@ -532,7 +532,11 @@ <h1 class="page-title">Source: ScrollMagic/Scene/event-management.js</h1>
<script>
function openDeeplinkedElement (skipAni) {
- $("dt h4.member-collapsed[id='" + window.location.hash.substring(1).replace(":", "\\:") +"']").trigger("click", skipAni);
+ try {
+ $("dt h4.member-collapsed").filter(window.location.hash.substring(1).replace(":", "\\:")).trigger("click", skipAni);
+ } catch (e) {
+ console.warn("ah ah ah! :p");
+ }
}
$( function () {
$( "#toc" ).toc( {
@@ -257,7 +257,11 @@ <h1 class="page-title">Source: ScrollMagic/Scene/feature-classToggles.js</h1>
<script>
function openDeeplinkedElement (skipAni) {
- $("dt h4.member-collapsed[id='" + window.location.hash.substring(1).replace(":", "\\:") +"']").trigger("click", skipAni);
+ try {
+ $("dt h4.member-collapsed").filter(window.location.hash.substring(1).replace(":", "\\:")).trigger("click", skipAni);
+ } catch (e) {
+ console.warn("ah ah ah! :p");
+ }
}
$( function () {
$( "#toc" ).toc( {
@@ -574,7 +574,11 @@ <h1 class="page-title">Source: ScrollMagic/Scene/feature-pinning.js</h1>
<script>
function openDeeplinkedElement (skipAni) {
- $("dt h4.member-collapsed[id='" + window.location.hash.substring(1).replace(":", "\\:") +"']").trigger("click", skipAni);
+ try {
+ $("dt h4.member-collapsed").filter(window.location.hash.substring(1).replace(":", "\\:")).trigger("click", skipAni);
+ } catch (e) {
+ console.warn("ah ah ah! :p");
+ }
}
$( function () {
$( "#toc" ).toc( {
@@ -478,7 +478,11 @@ <h1 class="page-title">Source: ScrollMagic/Scene/getters-setters.js</h1>
<script>
function openDeeplinkedElement (skipAni) {
- $("dt h4.member-collapsed[id='" + window.location.hash.substring(1).replace(":", "\\:") +"']").trigger("click", skipAni);
+ try {
+ $("dt h4.member-collapsed").filter(window.location.hash.substring(1).replace(":", "\\:")).trigger("click", skipAni);
+ } catch (e) {
+ console.warn("ah ah ah! :p");
+ }
}
$( function () {
$( "#toc" ).toc( {
@@ -449,7 +449,11 @@ <h1 class="page-title">Source: ScrollMagic/_util.js</h1>
<script>
function openDeeplinkedElement (skipAni) {
- $("dt h4.member-collapsed[id='" + window.location.hash.substring(1).replace(":", "\\:") +"']").trigger("click", skipAni);
+ try {
+ $("dt h4.member-collapsed").filter(window.location.hash.substring(1).replace(":", "\\:")).trigger("click", skipAni);
+ } catch (e) {
+ console.warn("ah ah ah! :p");
+ }
}
$( function () {
$( "#toc" ).toc( {
@@ -1033,7 +1033,11 @@ <h4 class="name" id="Scene.tweenChanges"><span class="type-signature"></span>Sce
<script>
function openDeeplinkedElement (skipAni) {
- $("dt h4.member-collapsed[id='" + window.location.hash.substring(1).replace(":", "\\:") +"']").trigger("click", skipAni);
+ try {
+ $("dt h4.member-collapsed").filter(window.location.hash.substring(1).replace(":", "\\:")).trigger("click", skipAni);
+ } catch (e) {
+ console.warn("ah ah ah! :p");
+ }
}
$( function () {
$( "#toc" ).toc( {
@@ -623,7 +623,11 @@ <h4 class="name" id="Scene.setVelocity"><span class="type-signature"></span>Scen
<script>
function openDeeplinkedElement (skipAni) {
- $("dt h4.member-collapsed[id='" + window.location.hash.substring(1).replace(":", "\\:") +"']").trigger("click", skipAni);
+ try {
+ $("dt h4.member-collapsed").filter(window.location.hash.substring(1).replace(":", "\\:")).trigger("click", skipAni);
+ } catch (e) {
+ console.warn("ah ah ah! :p");
+ }
}
$( function () {
$( "#toc" ).toc( {
@@ -3030,7 +3030,11 @@ <h5 class="subsection-title">Properties:</h5>
<script>
function openDeeplinkedElement (skipAni) {
- $("dt h4.member-collapsed[id='" + window.location.hash.substring(1).replace(":", "\\:") +"']").trigger("click", skipAni);
+ try {
+ $("dt h4.member-collapsed").filter(window.location.hash.substring(1).replace(":", "\\:")).trigger("click", skipAni);
+ } catch (e) {
+ console.warn("ah ah ah! :p");
+ }
}
$( function () {
$( "#toc" ).toc( {
@@ -950,7 +950,11 @@ <h4 class="name" id="Scene.removeIndicators"><span class="type-signature"></span
<script>
function openDeeplinkedElement (skipAni) {
- $("dt h4.member-collapsed[id='" + window.location.hash.substring(1).replace(":", "\\:") +"']").trigger("click", skipAni);
+ try {
+ $("dt h4.member-collapsed").filter(window.location.hash.substring(1).replace(":", "\\:")).trigger("click", skipAni);
+ } catch (e) {
+ console.warn("ah ah ah! :p");
+ }
}
$( function () {
$( "#toc" ).toc( {
@@ -272,7 +272,11 @@ <h3 class="subsection-title">Requires</h3>
<script>
function openDeeplinkedElement (skipAni) {
- $("dt h4.member-collapsed[id='" + window.location.hash.substring(1).replace(":", "\\:") +"']").trigger("click", skipAni);
+ try {
+ $("dt h4.member-collapsed").filter(window.location.hash.substring(1).replace(":", "\\:")).trigger("click", skipAni);
+ } catch (e) {
+ console.warn("ah ah ah! :p");
+ }
}
$( function () {
$( "#toc" ).toc( {
View
@@ -196,7 +196,7 @@
<p><strong>Option 1: GitHub</strong><br>Download a zip file containing the source code, demo page, all examples and documentation from the <a href="https://github.com/janpaepke/ScrollMagic/releases">GitHub releases page</a> or clone the package to your machine using the git command line interface:</p>
<pre class="prettyprint source lang-bash"><code>git clone git://github.com/janpaepke/ScrollMagic.git</code></pre><p><strong>Option 2: Bower</strong><br>ScrollMagic is also <a href="http://bower.io/search/?q=scrollmagic">available on bower</a> and will only install the necessary source code, ignoring all example and documentation files.<br>Please mind that since they are not core dependencies, you will have to add frameworks like GSAP, jQuery or Velocity manually, should you choose to use them.</p>
<pre class="prettyprint source lang-bash"><code>bower install scrollmagic</code></pre><p><strong>Option 3: npm</strong><br>If you prefer the <a href="https://www.npmjs.com/package/scrollmagic">node package manager</a>, feel free to use it.<br>Keep in mind that like with bower non-crucial files will be ignored (see above).</p>
-<pre class="prettyprint source lang-bash"><code>npm install scrollmagic</code></pre><p><strong>Option 4: CDN</strong><br>If you don't want to host ScrollMagic yourself, you can include it from <a href="https://cdnjs.com/libraries/scrollmagic">cdnjs</a>:</p>
+<pre class="prettyprint source lang-bash"><code>npm install scrollmagic</code></pre><p><strong>Option 4: CDN</strong><br>If you don't want to host ScrollMagic yourself, you can include it from <a href="https://cdnjs.com/libraries/ScrollMagic">cdnjs</a>:</p>
<pre class="prettyprint source"><code>http://cdnjs.cloudflare.com/ajax/libs/ScrollMagic/2.0.5/ScrollMagic.min.js</code></pre><p>All plugins and uncompressed files are also available on cdnjs.<br>For example:</p>
<pre class="prettyprint source"><code>http://cdnjs.cloudflare.com/ajax/libs/ScrollMagic/2.0.5/plugins/debug.addIndicators.js
http://cdnjs.cloudflare.com/ajax/libs/ScrollMagic/2.0.5/plugins/debug.addIndicators.min.js</code></pre><h2>Installation</h2><p>Include the <strong>core</strong> library in your HTML file:</p>
@@ -285,7 +285,11 @@
<script>
function openDeeplinkedElement (skipAni) {
- $("dt h4.member-collapsed[id='" + window.location.hash.substring(1).replace(":", "\\:") +"']").trigger("click", skipAni);
+ try {
+ $("dt h4.member-collapsed").filter(window.location.hash.substring(1).replace(":", "\\:")).trigger("click", skipAni);
+ } catch (e) {
+ console.warn("ah ah ah! :p");
+ }
}
$( function () {
$( "#toc" ).toc( {
@@ -3030,7 +3030,11 @@ <h5 class="subsection-title">Properties:</h5>
<script>
function openDeeplinkedElement (skipAni) {
- $("dt h4.member-collapsed[id='" + window.location.hash.substring(1).replace(":", "\\:") +"']").trigger("click", skipAni);
+ try {
+ $("dt h4.member-collapsed").filter(window.location.hash.substring(1).replace(":", "\\:")).trigger("click", skipAni);
+ } catch (e) {
+ console.warn("ah ah ah! :p");
+ }
}
$( function () {
$( "#toc" ).toc( {
@@ -3030,7 +3030,11 @@ <h5 class="subsection-title">Properties:</h5>
<script>
function openDeeplinkedElement (skipAni) {
- $("dt h4.member-collapsed[id='" + window.location.hash.substring(1).replace(":", "\\:") +"']").trigger("click", skipAni);
+ try {
+ $("dt h4.member-collapsed").filter(window.location.hash.substring(1).replace(":", "\\:")).trigger("click", skipAni);
+ } catch (e) {
+ console.warn("ah ah ah! :p");
+ }
}
$( function () {
$( "#toc" ).toc( {
@@ -494,7 +494,11 @@ <h1 class="page-title">Source: plugins/animation.gsap.js</h1>
<script>
function openDeeplinkedElement (skipAni) {
- $("dt h4.member-collapsed[id='" + window.location.hash.substring(1).replace(":", "\\:") +"']").trigger("click", skipAni);
+ try {
+ $("dt h4.member-collapsed").filter(window.location.hash.substring(1).replace(":", "\\:")).trigger("click", skipAni);
+ } catch (e) {
+ console.warn("ah ah ah! :p");
+ }
}
$( function () {
$( "#toc" ).toc( {
Oops, something went wrong.

0 comments on commit c202878

Please sign in to comment.