From 312c72c3640b293ba0de10c691e599a4694e059c Mon Sep 17 00:00:00 2001 From: muxator Date: Sun, 20 Oct 2019 02:09:22 +0200 Subject: [PATCH] formatting: bulk remove trailing whitespaces Do not touch vendorized files (e.g. libraries that were imported from external projects). No functional changes. Command: find . -name '*.' -type f -print0 | xargs -0 sed -i 's/[[:space:]]*$//' --- CONTRIBUTING.md | 4 +- bin/buildDebian.sh | 2 +- bin/buildForWindows.sh | 12 +- bin/convert.js | 138 +++++++++--------- bin/convertSettings.json.template | 2 +- bin/dirty-db-cleaner.py | 4 +- bin/doc/generate.js | 2 +- bin/safeRun.sh | 16 +- doc/api/changeset_library.md | 4 +- doc/api/embed_parameters.md | 2 +- doc/api/toolbar.md | 2 +- doc/plugins.md | 2 +- src/node/db/Pad.js | 2 +- src/node/hooks/i18n.js | 6 +- src/static/css/admin.css | 2 +- src/static/skins/colibris/pad.css | 14 +- .../skins/colibris/src/components/chat.css | 16 +- .../colibris/src/components/import-export.css | 2 +- .../skins/colibris/src/components/sidediv.css | 2 +- .../skins/colibris/src/components/toolbar.css | 2 +- .../skins/colibris/src/components/users.css | 4 +- src/static/skins/colibris/src/layout.css | 50 +++---- src/static/skins/colibris/src/pad-editor.css | 2 +- .../colibris/src/plugins/set_title_on_pad.css | 2 +- .../skins/colibris/src/plugins/tables2.css | 4 +- src/static/skins/colibris/timeslider.css | 8 +- src/static/skins/no-skin/pad.css | 2 +- tests/frontend/runner.css | 4 +- 28 files changed, 156 insertions(+), 156 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 11cf2f81..3137386c 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -10,7 +10,7 @@ * contain meaningful and detailed **commit messages** in the form: ``` submodule: description - + longer description of the change you have made, eventually mentioning the number of the issue that is being fixed, in the form: Fixes #someIssueNumber ``` @@ -131,4 +131,4 @@ Etherpad is much more than software. So if you aren't a developer then worry no * Work with SFC to maintain legal side of project * Maintain TODO page - https://github.com/ether/etherpad-lite/wiki/TODO#IMPORTANT_TODOS * Replying to messages on IRC / The Mailing list / Emails - + diff --git a/bin/buildDebian.sh b/bin/buildDebian.sh index 58431f73..a0fa180a 100755 --- a/bin/buildDebian.sh +++ b/bin/buildDebian.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -# IMPORTANT +# IMPORTANT # Protect against misspelling a var and rm -rf / set -u set -e diff --git a/bin/buildForWindows.sh b/bin/buildForWindows.sh index 3257bf18..17b7df90 100755 --- a/bin/buildForWindows.sh +++ b/bin/buildForWindows.sh @@ -11,21 +11,21 @@ if [ -d "../bin" ]; then fi #Is wget installed? -hash wget > /dev/null 2>&1 || { +hash wget > /dev/null 2>&1 || { echo "Please install wget" >&2 - exit 1 + exit 1 } #Is zip installed? -hash zip > /dev/null 2>&1 || { +hash zip > /dev/null 2>&1 || { echo "Please install zip" >&2 - exit 1 + exit 1 } #Is zip installed? -hash unzip > /dev/null 2>&1 || { +hash unzip > /dev/null 2>&1 || { echo "Please install unzip" >&2 - exit 1 + exit 1 } START_FOLDER=$(pwd); diff --git a/bin/convert.js b/bin/convert.js index 5b04b2db..7de2f9cb 100644 --- a/bin/convert.js +++ b/bin/convert.js @@ -26,10 +26,10 @@ log("open output file..."); var sqlOutput = fs.openSync(sqlOutputFile, "w"); var sql = "SET CHARACTER SET UTF8;\n" + "CREATE TABLE IF NOT EXISTS `store` ( \n" + - "`key` VARCHAR( 100 ) NOT NULL , \n" + - "`value` LONGTEXT NOT NULL , \n" + + "`key` VARCHAR( 100 ) NOT NULL , \n" + + "`value` LONGTEXT NOT NULL , \n" + "PRIMARY KEY ( `key` ) \n" + - ") ENGINE = INNODB;\n" + + ") ENGINE = INNODB;\n" + "START TRANSACTION;\n\n"; fs.writeSync(sqlOutput, sql); log("done"); @@ -52,7 +52,7 @@ async.series([ function(callback) { log("get all padIds out of the database..."); - + etherpadDB.query("SELECT ID FROM PAD_META", [], function(err, _padIDs) { padIDs = _padIDs; @@ -62,9 +62,9 @@ async.series([ function(callback) { log("done"); - + //create a queue with a concurrency 100 - var queue = async.queue(function (padId, callback) + var queue = async.queue(function (padId, callback) { convertPad(padId, function(err) { @@ -72,10 +72,10 @@ async.series([ callback(err); }); }, 100); - + //set the step callback as the queue callback queue.drain = callback; - + //add the padids to the worker queue for(var i=0,length=padIDs.length;i>${LOG} 2>>${LOG} - + #Send email if [ $ERROR_HANDLING = 1 ]; then TIME_NOW=$(date +%s) TIME_SINCE_LAST_SEND=$(($TIME_NOW - $LAST_EMAIL_SEND)) - + if [ $TIME_SINCE_LAST_SEND -gt $TIME_BETWEEN_EMAILS ]; then printf "Server was restarted at: $(date)\nThe last 50 lines of the log before the error happens:\n $(tail -n 50 ${LOG})" | mail -s "Pad Server was restarted" $EMAIL_ADDRESS - + LAST_EMAIL_SEND=$TIME_NOW fi fi - + echo "RESTART!" >>${LOG} - + #Sleep 10 seconds before restart sleep 10 done diff --git a/doc/api/changeset_library.md b/doc/api/changeset_library.md index 3bb4f055..863ae1cf 100644 --- a/doc/api/changeset_library.md +++ b/doc/api/changeset_library.md @@ -70,11 +70,11 @@ This creates an empty apool. An apool saves which attributes were used during th ``` > apool.fromJsonable({"numToAttrib":{"0":["author","a.kVnWeomPADAT2pn9"],"1":["bold","true"],"2":["italic","true"]},"nextNum":3}); > console.log(apool) -{ numToAttrib: +{ numToAttrib: { '0': [ 'author', 'a.kVnWeomPADAT2pn9' ], '1': [ 'bold', 'true' ], '2': [ 'italic', 'true' ] }, - attribToNum: + attribToNum: { 'author,a.kVnWeomPADAT2pn9': 0, 'bold,true': 1, 'italic,true': 2 }, diff --git a/doc/api/embed_parameters.md b/doc/api/embed_parameters.md index ea225d84..79b60f21 100644 --- a/doc/api/embed_parameters.md +++ b/doc/api/embed_parameters.md @@ -62,7 +62,7 @@ Example: `lang=ar` (translates the interface into Arabic) ## rtl * Boolean - + Default: true Displays pad text from right to left. diff --git a/doc/api/toolbar.md b/doc/api/toolbar.md index 03a3d8f8..bed84535 100644 --- a/doc/api/toolbar.md +++ b/doc/api/toolbar.md @@ -40,7 +40,7 @@ Returns: {SelectButton} * {String} value - The value of this option * {String} text - the label text used for this option * {Object} attributes - any additional html attributes go here (e.g. `data-l10n-id`) - + ## registerButton(name, item) * {String} name - used to reference the item in the toolbar config in settings.json * {Button|SelectButton} item - the button to add \ No newline at end of file diff --git a/doc/plugins.md b/doc/plugins.md index 4429e1bc..a91569ad 100644 --- a/doc/plugins.md +++ b/doc/plugins.md @@ -124,7 +124,7 @@ If your plugin adds or modifies the front end HTML (e.g. adding buttons or chang ## Writing and running front-end tests for your plugin -Etherpad allows you to easily create front-end tests for plugins. +Etherpad allows you to easily create front-end tests for plugins. 1. Create a new folder ``` diff --git a/src/node/db/Pad.js b/src/node/db/Pad.js index 0692215d..cf016444 100644 --- a/src/node/db/Pad.js +++ b/src/node/db/Pad.js @@ -460,7 +460,7 @@ Pad.prototype.remove = async function remove() { // none of the operations except getting the group depended on callbacks // so the database operations here are just started and then left to // run to completion - + // is it a group pad? -> delete the entry of this pad in the group if (padID.indexOf("$") >= 0) { diff --git a/src/node/hooks/i18n.js b/src/node/hooks/i18n.js index 1b5b354d..122efdd3 100644 --- a/src/node/hooks/i18n.js +++ b/src/node/hooks/i18n.js @@ -39,7 +39,7 @@ function getAllLocales() { //add core supported languages first extractLangs(npm.root+"/ep_etherpad-lite/locales"); - + //add plugins languages (if any) for(var pluginName in plugins) extractLangs(path.join(npm.root, pluginName, 'locales')); @@ -94,11 +94,11 @@ exports.expressCreateServer = function(n, args) { res.status(404).send('Language not available'); } }) - + args.app.get('/locales.json', function(req, res) { res.setHeader('Content-Type', 'application/json; charset=utf-8'); res.send(localeIndex); }) - + } diff --git a/src/static/css/admin.css b/src/static/css/admin.css index 62ba73d2..c44ce398 100644 --- a/src/static/css/admin.css +++ b/src/static/css/admin.css @@ -163,7 +163,7 @@ td, th { position: absolute; top: 0; left: 0; bottom:0; right:0; padding: auto; - + background: rgb(255,255,255); display: none; } diff --git a/src/static/skins/colibris/pad.css b/src/static/skins/colibris/pad.css index 3164808f..ad17132f 100644 --- a/src/static/skins/colibris/pad.css +++ b/src/static/skins/colibris/pad.css @@ -42,7 +42,7 @@ body, #tbl_context_menu ul .yuimenuitemlabel, .yui-skin-sam .yui-split-button button em:not(.color-picker-button), #yui-picker-panel .button-group .yui-button:first-child button, -#newComment .sidebar-comment input[type=reset], #newComment .sidebar-comment input[type=reset]:hover, +#newComment .sidebar-comment input[type=reset], #newComment .sidebar-comment input[type=reset]:hover, #newComment .sidebar-comment input[type=submit]:hover, .suggestion, .comment-reply-input, .reply-suggestion p:not(.reply-comment-suggest-from-p), .comment-text, .sidebar-comment textarea, .reply-comment-suggest label, .comment-suggest label, .comment-reply-input @@ -53,7 +53,7 @@ body, .suggestion .comment-suggest-from, .hyperlink-dialog>.hyperlink-url, .timeslider #padcontent span , -.exporttype, .timeslider #export > p +.exporttype, .timeslider #export > p { color: #2E3338 !important; } /* MENUS ICONS */ @@ -61,7 +61,7 @@ body, #tbl-menu:before { color: #767676 !important; } /* MENU BUTTONS */ -.timeslider #editbar .buttontext +.timeslider #editbar .buttontext { background-color: #767676 !important; } /* PRIMARY BUTTONS */ @@ -74,13 +74,13 @@ body, .comment-changeTo-approve input[type=submit], .hyperlink-dialog>.hyperlink-save, #importsubmitinput, #forcereconnect -{ - background-color: #64d29b; +{ + background-color: #64d29b; color: white; } /* PRIMARY COLOR */ -h1, +h1, #titlelabel, .yui-skin-sam .yui-panel .hd, p[data-l10n-id="ep_comments_page.comment"], @@ -88,7 +88,7 @@ p[data-l10n-id="ep_comments_page.comment"], .stepper, #importmessageabiword, #importmessageabiword > a { color: #64d29b; } #ui-slider-handle, #playpause_button_icon { - background-color: #64d29b; + background-color: #64d29b; } .stepper { border-color: #64d29b; diff --git a/src/static/skins/colibris/src/components/chat.css b/src/static/skins/colibris/src/components/chat.css index c9a66824..7a2979e0 100644 --- a/src/static/skins/colibris/src/components/chat.css +++ b/src/static/skins/colibris/src/components/chat.css @@ -10,7 +10,7 @@ } #chatbox.stickyChat { - width: 193px !important; + width: 193px !important; border: none !important; } @@ -32,7 +32,7 @@ #titlelabel, #chatlabel { text-transform: uppercase; - font-weight: bold; + font-weight: bold; } #titlelabel { font-size: 16px; } @@ -40,7 +40,7 @@ #chattext { top: 45px; - font-size: 13px; + font-size: 13px; bottom: 52px; overflow-y: auto; padding: 0; @@ -49,13 +49,13 @@ } .plugin-ep_author_neat #chattext { - padding: 10px; + padding: 10px; } -.plugin-ep_author_neat #chattext.authorColors p, +.plugin-ep_author_neat #chattext.authorColors p, .plugin-ep_author_neat #chattext.authorColors span { background-color: transparent !important; -} +} #chattext p b { color: #4c4c4c; @@ -76,7 +76,7 @@ } #chatbox.stickyChat #chattext { - padding: 0px; + padding: 0px; } #chatinputbox { @@ -85,7 +85,7 @@ #chatinput { width: calc(100% - 20px); - float: right; + float: right; } .plugin-ep_author_neat #chatbox.stickyChat #chattext { diff --git a/src/static/skins/colibris/src/components/import-export.css b/src/static/skins/colibris/src/components/import-export.css index 9407ade6..bdaa184e 100644 --- a/src/static/skins/colibris/src/components/import-export.css +++ b/src/static/skins/colibris/src/components/import-export.css @@ -4,7 +4,7 @@ width: calc(50% - 20px); } -#importmessageabiword { +#importmessageabiword { font-style: italic; font-size: 13px; } diff --git a/src/static/skins/colibris/src/components/sidediv.css b/src/static/skins/colibris/src/components/sidediv.css index 88193135..2fb83774 100644 --- a/src/static/skins/colibris/src/components/sidediv.css +++ b/src/static/skins/colibris/src/components/sidediv.css @@ -19,7 +19,7 @@ border-right: 5px solid transparent; } -#sidedivinner>div { +#sidedivinner>div { line-height: 24px; font-size: 10px !important; color: #a0a0a0; diff --git a/src/static/skins/colibris/src/components/toolbar.css b/src/static/skins/colibris/src/components/toolbar.css index 7c962e24..78d774c3 100644 --- a/src/static/skins/colibris/src/components/toolbar.css +++ b/src/static/skins/colibris/src/components/toolbar.css @@ -41,7 +41,7 @@ .toolbar ul li a:hover, .toolbar ul li a.selected, .toolbar ul li a:focus { - background: none !important; + background: none !important; border-radius: 0; } diff --git a/src/static/skins/colibris/src/components/users.css b/src/static/skins/colibris/src/components/users.css index 4d99ba28..bb5fbb49 100644 --- a/src/static/skins/colibris/src/components/users.css +++ b/src/static/skins/colibris/src/components/users.css @@ -79,7 +79,7 @@ table#otheruserstable { bottom: 42px; left: initial; top: initial !important; - } + } } #users.chatAndUsers { @@ -87,7 +87,7 @@ table#otheruserstable { box-shadow: none; border: none !important; padding: 10px; - padding-top: 15px; + padding-top: 15px; } #users.chatAndUsers #myusernameedit { diff --git a/src/static/skins/colibris/src/layout.css b/src/static/skins/colibris/src/layout.css index d0f7357b..9a32962c 100644 --- a/src/static/skins/colibris/src/layout.css +++ b/src/static/skins/colibris/src/layout.css @@ -9,26 +9,26 @@ #editorcontainer { top: 41px !important; - padding-top: 0 !important; + padding-top: 0 !important; } -#outerdocbody, .timeslider #editorcontainerbox { +#outerdocbody, .timeslider #editorcontainerbox { max-width: 900px; - margin: 0 auto; - padding-top: 20px; + margin: 0 auto; + padding-top: 20px; } #outerdocbody { overflow-y: auto; position: relative; - background-color: transparent; + background-color: transparent; padding-left: 40px; /* space for side div */ } #outerdocbody.plugin-ep_author_neat { padding-left: 120px; /* more space for sidediv */ } -@media (max-width:600px) { +@media (max-width:600px) { #outerdocbody.plugin-ep_author_neat { padding-left: 0; } #options-linenoscheck { display:none; } #options-linenoscheck ~ label { display:none; } @@ -42,16 +42,16 @@ display: block; position: relative; left: 0 !important; - top: 0; + top: 0; } #outerdocbody iframe, .timeslider #editorcontainerbox { padding: 55px; - box-shadow: 0 0 0 0.5px rgba(209, 209, 209, 0.32), 0 0 7pt 0pt rgba(204, 204, 204, 0.52); + box-shadow: 0 0 0 0.5px rgba(209, 209, 209, 0.32), 0 0 7pt 0pt rgba(204, 204, 204, 0.52); border: 0; border-radius: 5px; background-color: white; - width: calc(100% - 110px) !important; /* 100% - padding */ + width: calc(100% - 110px) !important; /* 100% - padding */ } #sidediv { @@ -62,8 +62,8 @@ padding: 0; } -#outerdocbody.plugin-ep_author_neat #sidediv { - right: calc(100% - 113px); +#outerdocbody.plugin-ep_author_neat #sidediv { + right: calc(100% - 113px); } /* Fixs comments_page & author_hover does not take in account the document padding */ @@ -73,22 +73,22 @@ #outerdocbody.plugin-ep_author_neat .authortooltip{ margin-left: 145px; } #outerdocbody.plugin-ep_author_neat .caretindicator{ margin-left: 52px; margin-top: 65px!important;} -@media (max-width:1000px) { - #outerdocbody.plugin-ep_author_neat .authortooltip{ margin-left: 115px; } - .caretindicator{ margin-left: 13px; } - #outerdocbody.plugin-ep_author_neat .caretindicator{ margin-left: 17px; } +@media (max-width:1000px) { + #outerdocbody.plugin-ep_author_neat .authortooltip{ margin-left: 115px; } + .caretindicator{ margin-left: 13px; } + #outerdocbody.plugin-ep_author_neat .caretindicator{ margin-left: 17px; } } -@media (min-width: 1381px) { +@media (min-width: 1381px) { #outerdocbody.plugin-ep_comments_page { padding-right: 150px; } } #outerdocbody.plugin-ep_comments_page #comments { left: calc(100% - 150px) } -@media (max-width: 1380px) { +@media (max-width: 1380px) { #outerdocbody.plugin-ep_comments_page #comments { left: calc(100% - 220px) } - #outerdocbody.plugin-ep_comments_page { padding-right: 220px; } + #outerdocbody.plugin-ep_comments_page { padding-right: 220px; } } -@media (max-width: 1278px) { +@media (max-width: 1278px) { #outerdocbody.plugin-ep_comments_page #comments { display: none; } - #outerdocbody.plugin-ep_comments_page { padding-right: 0px; } + #outerdocbody.plugin-ep_comments_page { padding-right: 0px; } } @media (max-width:1000px) { @@ -101,17 +101,17 @@ border-radius: 0; width: calc(100% - 40px) !important; /* 100% - padding */ } - #sidediv { + #sidediv { top: 20px !important; /* = #outerdocbody iframe padding-top */ - } + } .comment-modal, .authortooltip { margin-top: 20px !important; } .caretindicator { margin-top: 0px !important; } #outerdocbody.plugin-ep_author_neat .caretindicator { margin-top: 10px !important; } #outerdocbody.plugin-ep_author_neat #sidedivinner>div:before { padding-right: 10px !important; } - #outerdocbody.plugin-ep_author_neat #sidedivinner.authorColors>div, - #outerdocbody.plugin-ep_author_neat #sidedivinner.authorColors>div.primary-none, + #outerdocbody.plugin-ep_author_neat #sidedivinner.authorColors>div, + #outerdocbody.plugin-ep_author_neat #sidedivinner.authorColors>div.primary-none, #outerdocbody.plugin-ep_author_neat #sidedivinner>div { padding-right: 6px!important; } #outerdocbody.plugin-ep_author_neat #sidediv { padding-right: 0 !important; } } @@ -125,7 +125,7 @@ padding: 15px !important; width: calc(100% - 30px) !important; /* 100% - padding */ } - #sidediv { + #sidediv { display: none; top: 15px !important; /* = #outerdocbody iframe padding-top */ } diff --git a/src/static/skins/colibris/src/pad-editor.css b/src/static/skins/colibris/src/pad-editor.css index 6127a30c..aae79bf8 100644 --- a/src/static/skins/colibris/src/pad-editor.css +++ b/src/static/skins/colibris/src/pad-editor.css @@ -1,6 +1,6 @@ #innerdocbody, #padcontent { font-size: 15px; - line-height: 25px; + line-height: 25px; padding: 0; } diff --git a/src/static/skins/colibris/src/plugins/set_title_on_pad.css b/src/static/skins/colibris/src/plugins/set_title_on_pad.css index 8d0c7667..94b19520 100644 --- a/src/static/skins/colibris/src/plugins/set_title_on_pad.css +++ b/src/static/skins/colibris/src/plugins/set_title_on_pad.css @@ -5,7 +5,7 @@ } @media (max-width:720px) { - #pad_title { display: none !important; } + #pad_title { display: none !important; } } #edit_title { diff --git a/src/static/skins/colibris/src/plugins/tables2.css b/src/static/skins/colibris/src/plugins/tables2.css index 090bb5a7..d24056d4 100644 --- a/src/static/skins/colibris/src/plugins/tables2.css +++ b/src/static/skins/colibris/src/plugins/tables2.css @@ -6,7 +6,7 @@ background: none !important; width: 18px !important; padding-left: 2px !important; -} +} #tbl-menu:before { content: "\F0CE"; } @@ -51,7 +51,7 @@ border: none; text-align: center; background-color: transparent; - padding-top: 4px; + padding-top: 4px; } #tbl_insert .yuimenuitemlabel { text-align: center; } diff --git a/src/static/skins/colibris/timeslider.css b/src/static/skins/colibris/timeslider.css index 1f4d1645..ba5199ba 100644 --- a/src/static/skins/colibris/timeslider.css +++ b/src/static/skins/colibris/timeslider.css @@ -24,7 +24,7 @@ .timeslider #timeslider-top { position: relative; - border-bottom: 1px solid #e4e4e4; + border-bottom: 1px solid #e4e4e4; } .timeslider-bar { background: none; } @@ -60,8 +60,8 @@ background-color: transparent; } -#timeslider, #timeslider-left, #timeslider-right { - height: 57px; +#timeslider, #timeslider-left, #timeslider-right { + height: 57px; background-color: transparent; } @@ -133,7 +133,7 @@ text-align: center; border-radius: 50%; height: 25px; - padding-top: 2px; + padding-top: 2px; } .timeslider #authorsList .author { diff --git a/src/static/skins/no-skin/pad.css b/src/static/skins/no-skin/pad.css index f300b81c..b8cdb464 100644 --- a/src/static/skins/no-skin/pad.css +++ b/src/static/skins/no-skin/pad.css @@ -1,5 +1,5 @@ @media (max-width:600px) { - #sidediv { + #sidediv { display: none !important; } } \ No newline at end of file diff --git a/tests/frontend/runner.css b/tests/frontend/runner.css index 7d5bb783..ce158b81 100644 --- a/tests/frontend/runner.css +++ b/tests/frontend/runner.css @@ -1,6 +1,6 @@ html { height: 100%; -} +} body { padding: 0px; @@ -60,7 +60,7 @@ body { } #mocha h1 a:visited -{ +{ color: #00E; }