From 71797d1dd4af644d594110086ff1c02750aa0172 Mon Sep 17 00:00:00 2001 From: El RIDO Date: Sun, 22 Sep 2019 21:18:19 +0200 Subject: [PATCH] changes required for jsdoc, adding legacy.js to code coverage --- doc/README.md | 2 +- js/.nycrc.yml | 1 + js/legacy.js | 6 ++++-- js/privatebin.js | 4 ++-- tpl/bootstrap.php | 4 ++-- tpl/page.php | 4 ++-- 6 files changed, 12 insertions(+), 9 deletions(-) diff --git a/doc/README.md b/doc/README.md index 0e7bc706..d513ca34 100644 --- a/doc/README.md +++ b/doc/README.md @@ -55,6 +55,6 @@ $ ln -s /usr/bin/nodejs /usr/local/bin/node To generate the documentation, change into the main directory and run phpdoc: ```console $ cd PrivateBin -$ jsdoc -p -d doc/jsdoc js/privatebin.js +$ jsdoc -p -d doc/jsdoc js/privatebin.js js/legacy.js ``` diff --git a/js/.nycrc.yml b/js/.nycrc.yml index 9b9be15f..f45ab79e 100644 --- a/js/.nycrc.yml +++ b/js/.nycrc.yml @@ -1,5 +1,6 @@ --- include: + - legacy.js - privatebin.js reporter: - text diff --git a/js/legacy.js b/js/legacy.js index f1c90266..0e65ff78 100644 --- a/js/legacy.js +++ b/js/legacy.js @@ -6,10 +6,12 @@ * @see {@link https://github.com/PrivateBin/PrivateBin} * @copyright 2012 Sébastien SAUVAGE ({@link http://sebsauvage.net}) * @license {@link https://www.opensource.org/licenses/zlib-license.php The zlib/libpng License} - * @version 1.3 + * @version 1.3.1 * @name Legacy * @namespace - * + */ + +/** * IMPORTANT NOTICE FOR DEVELOPERS: * The logic in this file is intended to run in legacy browsers. Avoid any use of: * - jQuery (doesn't work in older browsers) diff --git a/js/privatebin.js b/js/privatebin.js index 6d1931a7..d411ebbe 100644 --- a/js/privatebin.js +++ b/js/privatebin.js @@ -9,10 +9,10 @@ * @version 1.3.1 * @name PrivateBin * @namespace - * - * global Base64, DOMPurify, FileReader, RawDeflate, history, navigator, prettyPrint, prettyPrintOne, showdown, kjua */ +// global Base64, DOMPurify, FileReader, RawDeflate, history, navigator, prettyPrint, prettyPrintOne, showdown, kjua + jQuery.fn.draghover = function() { 'use strict'; return this.each(function() { diff --git a/tpl/bootstrap.php b/tpl/bootstrap.php index 49c41f88..d9909343 100644 --- a/tpl/bootstrap.php +++ b/tpl/bootstrap.php @@ -71,8 +71,8 @@ if ($MARKDOWN): endif; ?> - - + + diff --git a/tpl/page.php b/tpl/page.php index 52e1e0ba..e3d67732 100644 --- a/tpl/page.php +++ b/tpl/page.php @@ -49,8 +49,8 @@ if ($MARKDOWN): endif; ?> - - + +