Skip to content

Commit

Permalink
Revert "Fixing DevTools Console Errors (DynamoDS#227)"
Browse files Browse the repository at this point in the history
This reverts commit f5853c1.
  • Loading branch information
EnzoBatistaU committed May 16, 2024
1 parent 6ae8c81 commit e5a63e0
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 14 deletions.
11 changes: 0 additions & 11 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -186,8 +186,6 @@
if (src.startsWith("data:image")) {
continue;
}

if(window.chrome.webview === undefined) return;
//request the icon from the extension.
var base64String = await window.chrome.webview.hostObjects.bridgeTwoWay.GetBase64StringFromPath(src);
if (currentImage != null) {
Expand All @@ -197,7 +195,6 @@
}

function refreshLibraryView(libraryController) {
if(window.chrome.webview === undefined) return;
window.chrome.webview.postMessage("RefreshLibrary");
}

Expand All @@ -206,15 +203,13 @@
var encodedText = encodeURIComponent(text);
//save the callback so we can access from our completion function
searchCallback = callback;
if(window.chrome.webview === undefined) return;
window.chrome.webview.postMessage(JSON.stringify({"func":"performSearch","data":encodedText}));
window.chrome.webview.postMessage(JSON.stringify({"func":"logEventsToInstrumentation","data":["Search",encodedText]}));
}

// Register event handlers for various events on library controller and package controller.
libController.on(libController.ItemClickedEventName, function (nodeCreationName) {
console.log('Library Node Clicked: ' + nodeCreationName);
if(window.chrome.webview === undefined) return;
window.chrome.webview.postMessage(JSON.stringify({"func":"createNode","data":nodeCreationName}));
});

Expand All @@ -230,18 +225,15 @@
}, true);

libController.on(libController.ItemMouseEnterEventName, function (arg) {
if(window.chrome.webview === undefined) return;
window.chrome.webview.postMessage(JSON.stringify({"func":"showNodeTooltip","data":[arg.data,arg.rect.top]}));
});

libController.on(libController.ItemMouseLeaveEventName, function (arg) {
if(window.chrome.webview === undefined) return;
window.chrome.webview.postMessage(JSON.stringify({"func":"closeNodeTooltip","data":true}));
});

libController.on(libController.SectionIconClickedEventName, function (section) {
console.log("Section clicked: " + section);
if(window.chrome.webview === undefined) return;
if (section == "Add-ons") {
window.chrome.webview.postMessage(JSON.stringify({"func":"importLibrary","data":""}));
}
Expand All @@ -253,13 +245,11 @@
var catString = elem.name + ":" + (elem.checked ? "Selected" : "Unselected");
categories.push(catString);
});
if(window.chrome.webview === undefined) return;
window.chrome.webview.postMessage(JSON.stringify({"func":"logEventsToInstrumentation","data":["Filter-Categories",categories.join(",")]}));
});

//This will call the NextStep() function located in the LibraryViewController
function nextStepInGuide() {
if(window.chrome.webview === undefined) return;
window.chrome.webview.postMessage(JSON.stringify({ "func": "NextStep", "data": "" }));
}

Expand Down Expand Up @@ -446,7 +436,6 @@

//This method will be executed when the WebBrowser change its size, so we can update the Popup vertical location that is over the library
function bodyResizeEvent() {
if(window.chrome.webview === undefined) return;
window.chrome.webview.postMessage(JSON.stringify({ "func": "ResizedEvent", "data": "" }));
}

Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@dynamods/librariejs",
"version": "1.0.3",
"version": "1.0.2",
"description": "Project that contains all hosted contents of Dynamo Windows client",
"main": "index.js",
"scripts": {
Expand Down

0 comments on commit e5a63e0

Please sign in to comment.