Skip to content

Commit

Permalink
1.8
Browse files Browse the repository at this point in the history
RELEASE

## editor.js
* metaHotkey to metaKey fix
* mac alt hotkeys for e.key fix

## bootstrap.js
* single ocr dont double count
  • Loading branch information
Noitidart committed May 16, 2016
1 parent c1f9818 commit 2d30fba
Show file tree
Hide file tree
Showing 18 changed files with 818 additions and 22,421 deletions.
26 changes: 13 additions & 13 deletions app/js/app_main.js
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ function templatedDataCaption(aTypeInt, aTitle, aSubtitle, aGettime, aImgSrc, aS
}

function nsOnFocus() {
console.log('focused');

readHistoryLog(function() {
updateCountsToSkillBars();
matchIsotopeContentsToFileJson(true);
Expand Down Expand Up @@ -286,7 +286,7 @@ function nsInitPage(aPostNonSkelInit_CB) {

}

console.log('servicesInfosReact:', servicesInfosReact);

servicesInfosReact.sort(function(a, b) {
return compareAlphaNumeric(a.serviceTitle, b.serviceTitle); // sort asc
});
Expand Down Expand Up @@ -429,7 +429,7 @@ var ServicesFilterRow = React.createClass({
cFilterBtns.push(React.createElement(ServiceFilterBtn, {pServiceName:'all', pServiceTitle:core.addon.l10n.app_main.title_all, sActiveFilter:this.props.sActiveFilter}));

var cServicesInfos = this.props.pServicesInfos;
console.log('cServicesInfos:', cServicesInfos);

for (var i=0; i<cServicesInfos.length; i++) {
var cServiceInfoEntry = cServicesInfos[i];
if (cServiceInfoEntry.hasAssociatedImgs) {
Expand Down Expand Up @@ -480,8 +480,8 @@ var ServicesSummaryCol = React.createClass({
// sServicesLogEntryCnts
// sActiveFilter

// console.log('pServicesInfosGroup:', this.props.pServicesInfosGroup);
// console.log('sServicesLogEntryCnts:', this.props.sServicesLogEntryCnts);



var cChildren = [];

Expand Down Expand Up @@ -1034,7 +1034,7 @@ function doOnBeforeUnload() {
}

function doOnContentLoad() {
console.log('in doOnContentLoad');

initPage();
}

Expand Down Expand Up @@ -1103,7 +1103,7 @@ var bootstrapMsgListener = {
funcScope: bootstrapCallbacks,
receiveMessage: function(aMsgEvent) {
var aMsgEventData = aMsgEvent.data;
console.log('framescript getting aMsgEvent, unevaled:', uneval(aMsgEventData));

// aMsgEvent.data should be an array, with first item being the unfction name in this.funcScope

var callbackPendingId;
Expand All @@ -1124,12 +1124,12 @@ var bootstrapMsgListener = {
contentMMFromContentWindow_Method2(content).sendAsyncMessage(core.addon.id, [callbackPendingId, aVal]);
},
function(aReason) {
console.error('aReject:', aReason);

contentMMFromContentWindow_Method2(content).sendAsyncMessage(core.addon.id, [callbackPendingId, ['promise_rejected', aReason]]);
}
).catch(
function(aCatch) {
console.error('aCatch:', aCatch);

contentMMFromContentWindow_Method2(content).sendAsyncMessage(core.addon.id, [callbackPendingId, ['promise_rejected', aCatch]]);
}
);
Expand All @@ -1139,7 +1139,7 @@ var bootstrapMsgListener = {
}
}
}
else { console.warn('funcName', funcName, 'not in scope of this.funcScope') } // else is intentionally on same line with console. so on finde replace all console. lines on release it will take this out


}
};
Expand Down Expand Up @@ -1198,7 +1198,7 @@ function genericReject(aPromiseName, aPromiseToReject, aReason) {
name: aPromiseName,
aReason: aReason
};
console.error('Rejected - ' + aPromiseName + ' - ', rejObj);

if (aPromiseToReject) {
aPromiseToReject.reject(rejObj);
}
Expand All @@ -1208,7 +1208,7 @@ function genericCatch(aPromiseName, aPromiseToReject, aCaught) {
name: aPromiseName,
aCaught: aCaught
};
console.error('Caught - ' + aPromiseName + ' - ', rejObj);

if (aPromiseToReject) {
aPromiseToReject.reject(rejObj);
}
Expand All @@ -1219,7 +1219,7 @@ function validateOptionsObj(aOptions, aOptionsDefaults) {
// ensures no invalid keys are found in aOptions, any key found in aOptions not having a key in aOptionsDefaults causes throw new Error as invalid option
for (var aOptKey in aOptions) {
if (!(aOptKey in aOptionsDefaults)) {
console.error('aOptKey of ' + aOptKey + ' is an invalid key, as it has no default value, aOptionsDefaults:', aOptionsDefaults, 'aOptions:', aOptions);

throw new Error('aOptKey of ' + aOptKey + ' is an invalid key, as it has no default value');
}
}
Expand Down
26 changes: 13 additions & 13 deletions app/js/app_ocr.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
var gQS;

window.addEventListener('message', function(aWinMsgEvent) {
// console.error('incoming window message to HTML: iMon:', tQS.iMon, 'aWinMsgEvent:', aWinMsgEvent);

var aData = aWinMsgEvent.data;
if (aData.topic in window) {
window[aData.topic](aData);
Expand All @@ -14,7 +14,7 @@ window.addEventListener('message', function(aWinMsgEvent) {
}, false);

function reactOcrResults(aData) {
console.log('in reatOcrResults, aData:', aData);


if (aData.error) {
renderReactError(aData.error);
Expand Down Expand Up @@ -65,7 +65,7 @@ var Container = React.createClass({
return {};
},
copy: function(e) {
console.log('copied, e:', e);

var parentNodes = document.querySelectorAll('[data-service-name]'); // parent el of the pTxt textNodes
var l = parentNodes.length;

Expand All @@ -74,7 +74,7 @@ var Container = React.createClass({
for (var i=0; i<l; i++) {
var textNode = parentNodes[i].childNodes[0]; // the pTxt containing node. its always a signle text element ah
if (textNode && textNode.textContent.trim().length) {
console.error(i, 'textNode.textContent.trim():', textNode.textContent.trim());

if (sel.containsNode(textNode, true)) {
var serviceName = parentNodes[i].getAttribute('data-service-name').toLowerCase();
contentMMFromContentWindow_Method2(window).sendAsyncMessage(core.addon.id, ['callInBootstrap', ['forBtnIdAndService_addEntryToLog', gQS.text, serviceName.toLowerCase()]]);
Expand Down Expand Up @@ -139,7 +139,7 @@ var Row = React.createClass({
var { pName, pTxt, sJuxt, sNoPre, pImgdata, pWidth, pHeight } = this.props;

var canRef = function(can) {
console.log('can:', can);

if (can) {
var ctx = can.getContext('2d');
ctx.putImageData(pImgdata, 0, 0);
Expand Down Expand Up @@ -240,7 +240,7 @@ function doOnBeforeUnload() {
}

function doOnContentLoad() {
console.log('in doOnContentLoad');

initPage();
}

Expand Down Expand Up @@ -309,7 +309,7 @@ var bootstrapMsgListener = {
funcScope: bootstrapCallbacks,
receiveMessage: function(aMsgEvent) {
var aMsgEventData = aMsgEvent.data;
console.log('framescript getting aMsgEvent, unevaled:', uneval(aMsgEventData));

// aMsgEvent.data should be an array, with first item being the unfction name in this.funcScope

var callbackPendingId;
Expand All @@ -330,12 +330,12 @@ var bootstrapMsgListener = {
contentMMFromContentWindow_Method2(content).sendAsyncMessage(core.addon.id, [callbackPendingId, aVal]);
},
function(aReason) {
console.error('aReject:', aReason);

contentMMFromContentWindow_Method2(content).sendAsyncMessage(core.addon.id, [callbackPendingId, ['promise_rejected', aReason]]);
}
).catch(
function(aCatch) {
console.error('aCatch:', aCatch);

contentMMFromContentWindow_Method2(content).sendAsyncMessage(core.addon.id, [callbackPendingId, ['promise_rejected', aCatch]]);
}
);
Expand All @@ -345,7 +345,7 @@ var bootstrapMsgListener = {
}
}
}
else { console.warn('funcName', funcName, 'not in scope of this.funcScope') } // else is intentionally on same line with console. so on finde replace all console. lines on release it will take this out


}
};
Expand Down Expand Up @@ -404,7 +404,7 @@ function genericReject(aPromiseName, aPromiseToReject, aReason) {
name: aPromiseName,
aReason: aReason
};
console.error('Rejected - ' + aPromiseName + ' - ', rejObj);

if (aPromiseToReject) {
aPromiseToReject.reject(rejObj);
}
Expand All @@ -414,7 +414,7 @@ function genericCatch(aPromiseName, aPromiseToReject, aCaught) {
name: aPromiseName,
aCaught: aCaught
};
console.error('Caught - ' + aPromiseName + ' - ', rejObj);

if (aPromiseToReject) {
aPromiseToReject.reject(rejObj);
}
Expand All @@ -425,7 +425,7 @@ function validateOptionsObj(aOptions, aOptionsDefaults) {
// ensures no invalid keys are found in aOptions, any key found in aOptions not having a key in aOptionsDefaults causes throw new Error as invalid option
for (var aOptKey in aOptions) {
if (!(aOptKey in aOptionsDefaults)) {
console.error('aOptKey of ' + aOptKey + ' is an invalid key, as it has no default value, aOptionsDefaults:', aOptionsDefaults, 'aOptions:', aOptions);

throw new Error('aOptKey of ' + aOptKey + ' is an invalid key, as it has no default value');
}
}
Expand Down
Loading

0 comments on commit 2d30fba

Please sign in to comment.