|
@@ -143,3 +143,29 @@ export const elemAddEventListener = (elem, action, fn) => {
|
|
|
elem.addEventListener(action, fn)
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
+export const addJoinedGroupList = () => {
|
|
|
+ if(ifShowNftGroup) {
|
|
|
+ let {pathname} = window.location;
|
|
|
+
|
|
|
+ let iframe = document.createElement('iframe');
|
|
|
+ iframe.id = 'de-joined-group-list';
|
|
|
+ iframe.src = chrome.runtime.getURL('/iframe/joined-group-list.html');
|
|
|
+ iframe.style.cssText = `border: medium none;width: 350px;height: 321px;border-radius: 16px;margin-bottom: 16px`
|
|
|
+
|
|
|
+ let iframeContent = document.getElementById('de-joined-group-list');
|
|
|
+
|
|
|
+ if (!iframeContent && pathname == '/home') {
|
|
|
+ let sidebarColumn = document.querySelector('div[data-testid="sidebarColumn"]');
|
|
|
+ if(sidebarColumn) {
|
|
|
+ let searchDom = sidebarColumn.querySelector('form[role="search"]');
|
|
|
+ if(searchDom) {
|
|
|
+ let listWrapperDom = searchDom.parentElement.parentElement.parentElement.parentElement;
|
|
|
+ let listParent = listWrapperDom.parentElement;
|
|
|
+ listParent.insertBefore(iframe, listWrapperDom.nextElementSibling.nextElementSibling);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+};
|