Skip to content

Commit b841cd1

Browse files
Signed-off-by: Steve Roberts <steve@shadowcomputers.co.uk>
1 parent af758cc commit b841cd1

3 files changed

Lines changed: 20 additions & 18 deletions

File tree

.gitignore

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
11
.DS_Store
22
.idea
33
**/node_modules
4+
5+
6+
*.zip
7+
SwapTokenPositions/*alpha*
8+
SwapTokenPositions/*beta*
9+
ConditionTracker/*alpha*
10+
ConditionTracker/*beta*
11+

.vscode/settings.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
11
{
2+
"snyk.advanced.organization": "faaf1ee5-1901-4d82-94e5-219b650f8421",
3+
"snyk.advanced.autoSelectOrganization": true
24
}

PinNote/1.0.0/PinNote.js

Lines changed: 10 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11
// Script: PinNote
22
// By: Keith Curtis
33
// Contact: https://app.roll20.net/users/162065/keithcurtis
4+
var API_Meta = API_Meta||{}; //eslint-disable-line no-var
5+
API_Meta.PinNote={offset:Number.MAX_SAFE_INTEGER,lineCount:-1};
6+
{try{throw new Error('');}catch(e){API_Meta.PinNote.offset=(parseInt(e.stack.split(/\n/)[1].replace(/^.*:(\d+):.*$/,'$1'),10)-6);}}
47

5-
const pinnote = (() => {
6-
//(() => {
8+
9+
(() => {
710
'use strict';
811

912
const version = '1.0.0'; //version number set here
@@ -40,17 +43,6 @@ const pinnote = (() => {
4043
);
4144
};
4245

43-
44-
const normalizeHTML = (html) => {
45-
if (!html) return html;
46-
47-
return html
48-
.replace(/\r\n/g, '') // Windows line endings
49-
.replace(/\n/g, '') // Unix line endings
50-
.replace(/\r/g, ''); // Old Mac line endings
51-
};
52-
53-
5446
/* ============================================================
5547
* HEADER COLOR ENFORCEMENT
5648
* ============================================================ */
@@ -281,8 +273,7 @@ const normalizeHTML = (html) => {
281273
template.footer +
282274
'</div>';
283275

284-
sendChat(sender, whisperPrefix + normalizeHTML(html));
285-
276+
sendChat(sender, whisperPrefix + html);
286277
return;
287278
}
288279

@@ -346,8 +337,9 @@ const normalizeHTML = (html) => {
346337
template.footer +
347338
'</div>';
348339

349-
sendChat(sender, whisperPrefix + normalizeHTML(html));
350-
340+
sendChat(sender, whisperPrefix + html);
351341
});
352342

353-
})();
343+
})();
344+
345+
{try{throw new Error('');}catch(e){API_Meta.PinNote.lineCount=(parseInt(e.stack.split(/\n/)[1].replace(/^.*:(\d+):.*$/,'$1'),10)-API_Meta.PinNote.offset);}}

0 commit comments

Comments
 (0)