diff --git a/src/static/js/Changeset.js b/src/static/js/Changeset.js
index b16042126..c897b0e00 100644
--- a/src/static/js/Changeset.js
+++ b/src/static/js/Changeset.js
@@ -284,7 +284,7 @@ exports.checkRep = function (cs) {
exports.assert(normalized == cs, normalized, ' != ', cs);
return cs;
-}
+};
/**
diff --git a/src/static/js/ace.js b/src/static/js/ace.js
index 83ad9447b..e359878e5 100644
--- a/src/static/js/ace.js
+++ b/src/static/js/ace.js
@@ -38,7 +38,7 @@ function scriptTag(source) {
''
- )
+ );
}
function Ace2Editor()
@@ -63,7 +63,7 @@ function Ace2Editor()
var action = function()
{
func.apply(that, args);
- }
+ };
if (optDoNow)
{
optDoNow.apply(that, args);
@@ -82,7 +82,7 @@ function Ace2Editor()
function doActionsPendingInit()
{
_.each(actionsPendingInit, function(fn,i){
- fn()
+ fn();
});
actionsPendingInit = [];
}
@@ -223,12 +223,12 @@ function Ace2Editor()
// source here.
// these lines must conform to a specific format because they are passed by the build script:
var includedCSS = [];
- var $$INCLUDE_CSS = function(filename) {includedCSS.push(filename)};
+ var $$INCLUDE_CSS = function(filename) {includedCSS.push(filename);};
$$INCLUDE_CSS("../static/css/iframe_editor.css");
$$INCLUDE_CSS("../static/css/pad.css");
$$INCLUDE_CSS("../static/custom/pad.css");
- var additionalCSS = _(hooks.callAll("aceEditorCSS")).map(function(path){ return '../static/plugins/' + path });
+ var additionalCSS = _(hooks.callAll("aceEditorCSS")).map(function(path){ return '../static/plugins/' + path; });
includedCSS = includedCSS.concat(additionalCSS);
pushStyleTagsFor(iframeHTML, includedCSS);
diff --git a/src/static/js/ace2_inner.js b/src/static/js/ace2_inner.js
index 2dc6408b1..1763874e9 100644
--- a/src/static/js/ace2_inner.js
+++ b/src/static/js/ace2_inner.js
@@ -205,7 +205,7 @@ function Ace2Inner(){
function getAuthorInfos(){
return authorInfos;
- };
+ }
editorInfo.ace_getAuthorInfos= getAuthorInfos;
function setAuthorInfo(author, info)
@@ -241,7 +241,7 @@ function Ace2Inner(){
var parentAuthorStyle = parentDynamicCSS.selectorStyle(getAuthorColorClassSelector(
getAuthorClassName(author)));
var anchorStyle = dynamicCSS.selectorStyle(getAuthorColorClassSelector(
- getAuthorClassName(author))+' > a')
+ getAuthorClassName(author))+' > a');
// author color
authorStyle.backgroundColor = bgcolor;
@@ -350,7 +350,7 @@ function Ace2Inner(){
editorInfo.ace_getAuthor = function()
{
return thisAuthor;
- }
+ };
var currentCallStack = null;
@@ -934,8 +934,8 @@ function Ace2Inner(){
// Convinience function returning a setter for a class on an element
var setClassPresenceNamed = function(element, cls){
return function(value){
- setClassPresence(element, cls, !! value)
- }
+ setClassPresence(element, cls, !! value);
+ };
};
// These properties are exposed
@@ -960,9 +960,9 @@ function Ace2Inner(){
textface: setTextFace,
textsize: setTextSize,
rtlistrue: function(value) {
- setClassPresence(root, "rtl", value)
- setClassPresence(root, "ltr", !value)
- document.documentElement.dir = value? 'rtl' : 'ltr'
+ setClassPresence(root, "rtl", value);
+ setClassPresence(root, "ltr", !value);
+ document.documentElement.dir = value? 'rtl' : 'ltr';
}
};
@@ -970,7 +970,7 @@ function Ace2Inner(){
// check if setter is present
if(setter !== undefined){
- setter(value)
+ setter(value);
}
};
@@ -4697,7 +4697,7 @@ function Ace2Inner(){
editorInfo.ace_getInInternationalComposition = function ()
{
return inInternationalComposition;
- }
+ };
function bindTheEventHandlers()
{
@@ -4970,7 +4970,7 @@ function Ace2Inner(){
function getLineListType(lineNum)
{
- return documentAttributeManager.getAttributeOnLine(lineNum, listAttributeName)
+ return documentAttributeManager.getAttributeOnLine(lineNum, listAttributeName);
}
function setLineListType(lineNum, listType)
@@ -5263,11 +5263,11 @@ function Ace2Inner(){
isSetUp = true;
});
- }
+ };
}
exports.init = function () {
- var editor = new Ace2Inner()
+ var editor = new Ace2Inner();
editor.init();
};
diff --git a/src/static/js/broadcast.js b/src/static/js/broadcast.js
index 6bd135bd2..514228286 100644
--- a/src/static/js/broadcast.js
+++ b/src/static/js/broadcast.js
@@ -273,7 +273,7 @@ function loadBroadcastJS(socket, sendSocketMsg, fireWhenAllScriptsAreLoaded, Bro
padContents.currentRevision = revision;
padContents.currentTime += timeDelta * 1000;
- debugLog('Time Delta: ', timeDelta)
+ debugLog('Time Delta: ', timeDelta);
updateTimer();
var authors = _.map(padContents.getActiveAuthors(), function(name)
@@ -292,7 +292,7 @@ function loadBroadcastJS(socket, sendSocketMsg, fireWhenAllScriptsAreLoaded, Bro
while (str.length < length)
str = '0' + str;
return str;
- }
+ };
var date = new Date(padContents.currentTime);
var dateFormat = function()
@@ -311,12 +311,9 @@ function loadBroadcastJS(socket, sendSocketMsg, fireWhenAllScriptsAreLoaded, Bro
"minutes": minutes,
"seconds": seconds
}));
- }
-
-
-
-
-
+ };
+
+
$('#timer').html(dateFormat());
var revisionDate = html10n.get("timeslider.saved", {
"day": date.getDate(),
@@ -336,7 +333,7 @@ function loadBroadcastJS(socket, sendSocketMsg, fireWhenAllScriptsAreLoaded, Bro
][date.getMonth()],
"year": date.getFullYear()
});
- $('#revision_date').html(revisionDate)
+ $('#revision_date').html(revisionDate);
}
@@ -570,7 +567,7 @@ function loadBroadcastJS(socket, sendSocketMsg, fireWhenAllScriptsAreLoaded, Bro
{
goToRevision.apply(goToRevision, arguments);
}
- }
+ };
BroadcastSlider.onSlider(goToRevisionIfEnabled);
@@ -586,7 +583,7 @@ function loadBroadcastJS(socket, sendSocketMsg, fireWhenAllScriptsAreLoaded, Bro
if (bgcolor && dynamicCSS)
{
var selector = dynamicCSS.selectorStyle('.' + linestylefilter.getAuthorClassName(author));
- selector.backgroundColor = bgcolor
+ selector.backgroundColor = bgcolor;
selector.color = (colorutils.luminosity(colorutils.css2triple(bgcolor)) < 0.5) ? '#ffffff' : '#000000'; //see ace2_inner.js for the other part
}
authorData[author] = data;
diff --git a/src/static/js/broadcast_revisions.js b/src/static/js/broadcast_revisions.js
index 1980bdf30..e4535d8a0 100644
--- a/src/static/js/broadcast_revisions.js
+++ b/src/static/js/broadcast_revisions.js
@@ -46,7 +46,7 @@ function loadBroadcastRevisionsJS()
{
return (b.deltaRev - a.deltaRev)
});
- }
+ };
revisionInfo = {};
revisionInfo.addChangeset = function(fromIndex, toIndex, changeset, backChangeset, timeDelta)
@@ -55,7 +55,7 @@ function loadBroadcastRevisionsJS()
var endRevision = revisionInfo[toIndex] || revisionInfo.createNew(toIndex);
startRevision.addChangeset(toIndex, changeset, timeDelta);
endRevision.addChangeset(fromIndex, backChangeset, -1 * timeDelta);
- }
+ };
revisionInfo.latest = clientVars.collab_client_vars.rev || -1;
@@ -68,7 +68,7 @@ function loadBroadcastRevisionsJS()
}
return revisionInfo[index];
- }
+ };
// assuming that there is a path from fromIndex to toIndex, and that the links
// are laid out in a skip-list format
@@ -80,7 +80,7 @@ function loadBroadcastRevisionsJS()
var elem = revisionInfo[fromIndex] || revisionInfo.createNew(fromIndex);
if (elem.changesets.length != 0 && fromIndex != toIndex)
{
- var reverse = !(fromIndex < toIndex)
+ var reverse = !(fromIndex < toIndex);
while (((elem.rev < toIndex) && !reverse) || ((elem.rev > toIndex) && reverse))
{
var couldNotContinue = false;
@@ -122,7 +122,7 @@ function loadBroadcastRevisionsJS()
'spans': spans,
'times': times
};
- }
+ }:
}
exports.loadBroadcastRevisionsJS = loadBroadcastRevisionsJS;
diff --git a/src/static/js/chat.js b/src/static/js/chat.js
index 38d6f38d3..a23ed2173 100644
--- a/src/static/js/chat.js
+++ b/src/static/js/chat.js
@@ -110,7 +110,7 @@ var chat = (function()
"sticky" : false,
"timestamp" : msg.time,
"timeStr" : timeStr
- }
+ };
// is the users focus already in the chatbox?
var alreadyFocused = $("#chatinput").is(":focus");
@@ -200,7 +200,7 @@ var chat = (function()
self.historyPointer = start;
});
}
- }
+ };
return self;
}());
diff --git a/src/static/js/collab_client.js b/src/static/js/collab_client.js
index 941491237..519100bc7 100644
--- a/src/static/js/collab_client.js
+++ b/src/static/js/collab_client.js
@@ -94,7 +94,7 @@ function getCollabClient(ace2editor, serverVars, initialUserInfo, options, _pad)
{
if (evt.which == 27)
{
- evt.preventDefault()
+ evt.preventDefault();
}
});
}
@@ -547,7 +547,7 @@ function getCollabClient(ace2editor, serverVars, initialUserInfo, options, _pad)
{
action();
}
- }
+ };
}
function doDeferredActions(tag)
diff --git a/src/static/js/colorutils.js b/src/static/js/colorutils.js
index 74a2e4635..6bd5a2e11 100644
--- a/src/static/js/colorutils.js
+++ b/src/static/js/colorutils.js
@@ -29,7 +29,7 @@ var colorutils = {};
colorutils.isCssHex = function(cssColor)
{
return /^#([0-9a-f]{3}|[0-9a-f]{6})$/i.test(cssColor);
-}
+};
// "#ffffff" or "#fff" or "ffffff" or "fff" to [1.0, 1.0, 1.0]
colorutils.css2triple = function(cssColor)
@@ -41,7 +41,7 @@ colorutils.css2triple = function(cssColor)
return Number("0x" + hh) / 255;
}
return [hexToFloat(sixHex.substr(0, 2)), hexToFloat(sixHex.substr(2, 2)), hexToFloat(sixHex.substr(4, 2))];
-}
+};
// "#ffffff" or "#fff" or "ffffff" or "fff" to "ffffff"
colorutils.css2sixhex = function(cssColor)
@@ -55,7 +55,7 @@ colorutils.css2sixhex = function(cssColor)
h = a + a + b + b + c + c;
}
return h;
-}
+};
// [1.0, 1.0, 1.0] -> "#ffffff"
colorutils.triple2css = function(triple)
@@ -66,8 +66,7 @@ colorutils.triple2css = function(triple)
return ("0" + n2.toString(16)).slice(-2);
}
return "#" + floatToHex(triple[0]) + floatToHex(triple[1]) + floatToHex(triple[2]);
-}
-
+};
colorutils.clamp = function(v, bot, top)
{
@@ -101,18 +100,18 @@ colorutils.unscale = function(v, bot, top)
colorutils.scaleColor = function(c, bot, top)
{
return [colorutils.scale(c[0], bot, top), colorutils.scale(c[1], bot, top), colorutils.scale(c[2], bot, top)];
-}
+};
colorutils.unscaleColor = function(c, bot, top)
{
return [colorutils.unscale(c[0], bot, top), colorutils.unscale(c[1], bot, top), colorutils.unscale(c[2], bot, top)];
-}
+};
colorutils.luminosity = function(c)
{
// rule of thumb for RGB brightness; 1.0 is white
return c[0] * 0.30 + c[1] * 0.59 + c[2] * 0.11;
-}
+};
colorutils.saturate = function(c)
{
@@ -120,17 +119,17 @@ colorutils.saturate = function(c)
var max = colorutils.colorMax(c);
if (max - min <= 0) return [1.0, 1.0, 1.0];
return colorutils.unscaleColor(c, min, max);
-}
+};
colorutils.blend = function(c1, c2, t)
{
return [colorutils.scale(t, c1[0], c2[0]), colorutils.scale(t, c1[1], c2[1]), colorutils.scale(t, c1[2], c2[2])];
-}
+};
colorutils.invert = function(c)
{
return [1 - c[0], 1 - c[1], 1- c[2]];
-}
+};
colorutils.complementary = function(c)
{
@@ -140,6 +139,6 @@ colorutils.complementary = function(c)
(inv[1] >= c[1]) ? Math.min(inv[1] * 1.59, 1) : (c[1] * 0.59),
(inv[2] >= c[2]) ? Math.min(inv[2] * 1.11, 1) : (c[2] * 0.11)
];
-}
+};
exports.colorutils = colorutils;
diff --git a/src/static/js/contentcollector.js b/src/static/js/contentcollector.js
index 645b7fce4..0e071db9b 100644
--- a/src/static/js/contentcollector.js
+++ b/src/static/js/contentcollector.js
@@ -211,11 +211,11 @@ function makeContentCollector(collectStyles, browser, apool, domInterface, class
cc.incrementFlag = function(state, flagName)
{
state.flags[flagName] = (state.flags[flagName] || 0) + 1;
- }
+ };
cc.decrementFlag = function(state, flagName)
{
state.flags[flagName]--;
- }
+ };
cc.incrementAttrib = function(state, attribName)
{
if (!state.attribs[attribName])
@@ -227,12 +227,12 @@ function makeContentCollector(collectStyles, browser, apool, domInterface, class
state.attribs[attribName]++;
}
_recalcAttribString(state);
- }
+ };
cc.decrementAttrib = function(state, attribName)
{
state.attribs[attribName]--;
_recalcAttribString(state);
- }
+ };
function _enterList(state, listType)
{
@@ -311,7 +311,7 @@ function makeContentCollector(collectStyles, browser, apool, domInterface, class
['insertorder', 'first']
].concat(
_.map(state.lineAttributes,function(value,key){
- if (typeof(window)!= 'undefined' && window.console) console.log([key, value])
+ if (typeof(window)!= 'undefined' && window.console) console.log([key, value]);
return [key, value];
})
);
@@ -329,7 +329,7 @@ function makeContentCollector(collectStyles, browser, apool, domInterface, class
}
}
lines.startNew();
- }
+ };
cc.notifySelection = function(sel)
{
if (sel)
@@ -724,7 +724,7 @@ function makeContentCollector(collectStyles, browser, apool, domInterface, class
lines: lineStrings,
lineAttribs: lineAttribs
};
- }
+ };
return cc;
}
diff --git a/src/static/js/domline.js b/src/static/js/domline.js
index 43b5f21a3..beb6c3dda 100644
--- a/src/static/js/domline.js
+++ b/src/static/js/domline.js
@@ -49,7 +49,7 @@ domline.addToLineClass = function(lineClass, cls)
}
});
return lineClass;
-}
+};
// if "document" is falsy we don't create a DOM node, just
// an object with innerHTML and className
diff --git a/src/static/js/l10n.js b/src/static/js/l10n.js
index c79ea706d..3f19f4679 100644
--- a/src/static/js/l10n.js
+++ b/src/static/js/l10n.js
@@ -4,11 +4,11 @@
if(language) language = language[1];
html10n.bind('indexed', function() {
- html10n.localize([language, navigator.language, navigator.userLanguage, 'en'])
- })
+ html10n.localize([language, navigator.language, navigator.userLanguage, 'en']);
+ });
html10n.bind('localized', function() {
- document.documentElement.lang = html10n.getLanguage()
- document.documentElement.dir = html10n.getDirection()
- })
-})(document)
\ No newline at end of file
+ document.documentElement.lang = html10n.getLanguage();
+ document.documentElement.dir = html10n.getDirection();
+ });
+})(document);
diff --git a/src/static/js/pad.js b/src/static/js/pad.js
index e5e6e95f3..6e235f03b 100644
--- a/src/static/js/pad.js
+++ b/src/static/js/pad.js
@@ -117,14 +117,14 @@ var getParameters = [
{ name: "userName", checkVal: null, callback: function(val) { settings.globalUserName = decodeURIComponent(val); } },
// If the userColor is set as a parameter, set a global value to use once we have initiated the pad.
{ name: "userColor", checkVal: null, callback: function(val) { settings.globalUserColor = decodeURIComponent(val); } },
- { name: "rtl", checkVal: "true", callback: function(val) { settings.rtlIsTrue = true } },
+ { name: "rtl", checkVal: "true", callback: function(val) { settings.rtlIsTrue = true; } },
{ name: "alwaysShowChat", checkVal: "true", callback: function(val) { chat.stickToScreen(); } },
{ name: "lang", checkVal: null, callback: function(val) { window.html10n.localize([val, 'en']); } }
];
function getParams()
{
- var params = getUrlVars()
+ var params = getUrlVars();
for(var i = 0; i < getParameters.length; i++)
{
@@ -212,7 +212,7 @@ function handshake()
}
socket.json.send(msg);
- };
+ }
var disconnectTimeout;
@@ -293,7 +293,7 @@ function handshake()
pad._afterHandshake();
initalized = true;
- $("body").addClass(clientVars.readonly ? "readonly" : "readwrite")
+ $("body").addClass(clientVars.readonly ? "readonly" : "readwrite");
padeditor.ace.callWithAce(function (ace) {
ace.ace_setEditable(!clientVars.readonly);
diff --git a/src/static/js/pad_editbar.js b/src/static/js/pad_editbar.js
index cc9f8758c..75dee45ee 100644
--- a/src/static/js/pad_editbar.js
+++ b/src/static/js/pad_editbar.js
@@ -190,7 +190,7 @@ var padeditbar = (function()
// hide all modules and remove highlighting of all buttons
if(moduleName == "none")
{
- var returned = false
+ var returned = false;
for(var i=0;iYou have no permission to access this pad")
+ $("body").html("You have no permission to access this pad
");
} else {
changesetLoader.handleMessageFromServer(message);
}
});
//get all the export links
- export_links = $('#export > .exportlink')
+ export_links = $('#export > .exportlink');
if(document.referrer.length > 0 && document.referrer.substring(document.referrer.lastIndexOf("/")-1,document.referrer.lastIndexOf("/")) === "p") {
$("#returnbutton").attr("href", document.referrer);
diff --git a/src/static/js/virtual_lines.js b/src/static/js/virtual_lines.js
index 2bcf5ed63..2c6d18792 100644
--- a/src/static/js/virtual_lines.js
+++ b/src/static/js/virtual_lines.js
@@ -186,7 +186,7 @@ function makeVirtualLineView(lineNode)
var curNode = null;
var curChar = 0;
- var curCharWithinNode = 0
+ var curCharWithinNode = 0;
var curTop;
var curLeft;
var approxLineHeight;
@@ -358,11 +358,11 @@ function makeVirtualLineView(lineNode)
seeker.forwardByWhile = function(amount, optCondFunc, optCharLimit)
{
moveByWhile(false, amount, optCondFunc, optCharLimit);
- }
+ };
seeker.backwardByWhile = function(amount, optCondFunc, optCharLimit)
{
moveByWhile(true, amount, optCondFunc, optCharLimit);
- }
+ };
seeker.binarySearch = function(condFunc)
{
// returns index of boundary between false chars and true chars;
@@ -378,7 +378,7 @@ function makeVirtualLineView(lineNode)
seeker.backwardByWhile(5, trueFunc);
seeker.forwardByWhile(1, falseFunc);
return seeker.getOffset() + (condFunc() ? 0 : 1);
- }
+ };
return seeker;
}