Explorar o código

making AttachmentViewer testable

El RIDO %!s(int64=8) %!d(string=hai) anos
pai
achega
dac86eb363
Modificáronse 4 ficheiros con 5 adicións e 7 borrados
  1. 2 4
      js/privatebin.js
  2. 1 1
      js/test.js
  3. 1 1
      tpl/bootstrap.php
  4. 1 1
      tpl/page.php

+ 2 - 4
js/privatebin.js

@@ -1923,11 +1923,9 @@ jQuery.PrivateBin = function($, sjcl, Base64, RawDeflate) {
      * (view) Show attachment and preview if possible
      *
      * @name   AttachmentViewer
-     * @param  {object} window
-     * @param  {object} document
      * @class
      */
-    var AttachmentViewer = (function (window, document) {
+    var AttachmentViewer = (function () {
         var me = {};
 
         var $attachmentLink,
@@ -2085,7 +2083,7 @@ jQuery.PrivateBin = function($, sjcl, Base64, RawDeflate) {
         }
 
         return me;
-    })(window, document);
+    })();
 
     /**
      * (view) Shows discussion thread and handles replies

+ 1 - 1
js/test.js

@@ -1444,7 +1444,7 @@ describe('PasteViewer', function () {
             'sanitizes XSS',
             jsc.elements(['plaintext', 'markdown', 'syntaxhighlighting']),
             'string',
-            // https://www.owasp.org/index.php/XSS_Filter_Evasion_Cheat_Sheet
+            // @see    {@link https://www.owasp.org/index.php/XSS_Filter_Evasion_Cheat_Sheet}
             jsc.elements([
                 '<PLAINTEXT>',
                 '></SCRIPT>">\'><SCRIPT>alert(String.fromCharCode(88,83,83))</SCRIPT>',

+ 1 - 1
tpl/bootstrap.php

@@ -70,7 +70,7 @@ if ($MARKDOWN):
 <?php
 endif;
 ?>
-		<script type="text/javascript" src="js/privatebin.js?<?php echo rawurlencode($VERSION); ?>" integrity="sha512-EvNAh1GXOoUiGZ/W8iPtzsce06bvVHy6+ajJztmfSgdQcKMPoj0dB8j1FC90MEChl7MOeR4xozvDymH/6HwIlA==" crossorigin="anonymous"></script>
+		<script type="text/javascript" src="js/privatebin.js?<?php echo rawurlencode($VERSION); ?>" integrity="sha512-NDAfNtN88qJLs6tH5RjjDDdd/sbFFrufgR8RpT6UACus40DLSO6vmSNje9L5IZl+93XBaTxryE7ud9Irkjfh2A==" crossorigin="anonymous"></script>
 		<!--[if lt IE 10]>
 		<style type="text/css">body {padding-left:60px;padding-right:60px;} #ienotice {display:block;} #oldienotice {display:block;}</style>
 		<![endif]-->

+ 1 - 1
tpl/page.php

@@ -48,7 +48,7 @@ if ($MARKDOWN):
 <?php
 endif;
 ?>
-		<script type="text/javascript" src="js/privatebin.js?<?php echo rawurlencode($VERSION); ?>" integrity="sha512-EvNAh1GXOoUiGZ/W8iPtzsce06bvVHy6+ajJztmfSgdQcKMPoj0dB8j1FC90MEChl7MOeR4xozvDymH/6HwIlA==" crossorigin="anonymous"></script>
+		<script type="text/javascript" src="js/privatebin.js?<?php echo rawurlencode($VERSION); ?>" integrity="sha512-NDAfNtN88qJLs6tH5RjjDDdd/sbFFrufgR8RpT6UACus40DLSO6vmSNje9L5IZl+93XBaTxryE7ud9Irkjfh2A==" crossorigin="anonymous"></script>
 		<!--[if lt IE 10]>
 		<style type="text/css">body {padding-left:60px;padding-right:60px;} #ienotice {display:block;} #oldienotice {display:block;}</style>
 		<![endif]-->