diff --git a/iframe-sandbox-app/src/mgtiframe/MGTIframe.tsx b/iframe-sandbox-app/src/mgtiframe/MGTIframe.tsx index 6c9e645..652f0d0 100644 --- a/iframe-sandbox-app/src/mgtiframe/MGTIframe.tsx +++ b/iframe-sandbox-app/src/mgtiframe/MGTIframe.tsx @@ -25,19 +25,21 @@ const MGTIframe = () => { if (data.code) { setCode(data.code); } - console.log('onMessageReceivedFromIframe', event.data); + //console.log('onMessageReceivedFromIframe', event.data); }, []); useEffect(() => { window.addEventListener('message', onMessageReceivedFromIframe); - console.log('registered listener'); - return () => console.log('removing listener, but not'); - // window.removeEventListener("message", onMessageReceivedFromIframe); + //console.log('registered listener'); + return () => { + //console.log('removing listener, but not'); + // window.removeEventListener("message", onMessageReceivedFromIframe); + }; }, [onMessageReceivedFromIframe]); React.useEffect(function setupListener() { function handleResize(x: any) { - console.log('theme changed', x.detail); + //console.log('theme changed', x.detail); if (x.detail) { document.body.style.backgroundColor = 'black'; } else { @@ -47,7 +49,7 @@ const MGTIframe = () => { window.addEventListener('darkmodechanged', handleResize); return function cleanupListener() { - console.log('removing listener'); + //console.log('removing listener'); window.removeEventListener('darkmodechanged', handleResize); }; @@ -57,7 +59,7 @@ const MGTIframe = () => { var getAccessToken = async (scopes: any[]): Promise => { return new Promise(function (resolve) { - console.log('getting token for scopes', scopes); + //console.log('getting token for scopes', scopes); window.parent.postMessage( JSON.stringify({ @@ -68,7 +70,7 @@ const MGTIframe = () => { window.addEventListener('message', function dataReady(event) { let data = JSON.parse(event.data); - console.log('got token from parent', data); + //console.log('got token from parent', data); if (data.token) { Providers.globalProvider.setState(ProviderState.SignedIn); resolve(data.token); diff --git a/package-lock.json b/package-lock.json index a169a7a..10d0188 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "sp-editor", - "version": "7.0.0", + "version": "7.0.2", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "sp-editor", - "version": "7.0.0", + "version": "7.0.2", "dependencies": { "@azure/msal-browser": "^3.23.0", "@azure/msal-react": "^2.0.22", diff --git a/package.json b/package.json index dd63499..d55f4a3 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "sp-editor", - "version": "7.0.1", + "version": "7.0.2", "private": true, "homepage": ".", "dependencies": { diff --git a/public/manifest.json b/public/manifest.json index 5da06e9..046b1a6 100644 --- a/public/manifest.json +++ b/public/manifest.json @@ -1,7 +1,7 @@ { "name": "SP Editor", "homepage_url": "https://microsoftedge.microsoft.com/addons/detail/affnnhcbfmcbbdlcadgkdbfafigmjdkk", - "version": "7.0.1", + "version": "7.0.2", "description": "Create and update SharePoint Online/SP2013/SP2016/SP2019 css/js files, inject files to web, manage web/list properties, list Webhook", "manifest_version": 3, "devtools_page": "devtools.html", @@ -37,7 +37,6 @@ "bundles/msaljsclient.es5.umd.bundle.js", "bundles/sp-scriptlinks.sppkg", "bundles/graph-sdk.es5.umd.bundle.js", - "bundles/msal.js", "bundles/msal-browser.js", "index.html" ], diff --git a/src/pages/graphsdkconsole/components/graphsdkeditor.tsx b/src/pages/graphsdkconsole/components/graphsdkeditor.tsx index 6b09bfe..9a18fa0 100644 --- a/src/pages/graphsdkconsole/components/graphsdkeditor.tsx +++ b/src/pages/graphsdkconsole/components/graphsdkeditor.tsx @@ -252,7 +252,7 @@ const GraphSDKEditor = () => { chrome.devtools.inspectedWindow.eval(script.replace(/TOKENHERE/g, response.accessToken)) } } catch (e) { - console.log(e) + //console.log(e) } } }, diff --git a/src/pages/mgtconsole/components/mgteditor.tsx b/src/pages/mgtconsole/components/mgteditor.tsx index a406ef3..1f2741a 100644 --- a/src/pages/mgtconsole/components/mgteditor.tsx +++ b/src/pages/mgtconsole/components/mgteditor.tsx @@ -101,7 +101,7 @@ const MGTEditor = () => { ); } } catch (e) { - console.log(e); + //console.log(e); } }, [dispatch]); diff --git a/src/pages/pnpjsconsole/components/pnpjseditor.tsx b/src/pages/pnpjsconsole/components/pnpjseditor.tsx index de951e8..453572f 100644 --- a/src/pages/pnpjsconsole/components/pnpjseditor.tsx +++ b/src/pages/pnpjsconsole/components/pnpjseditor.tsx @@ -160,7 +160,7 @@ const PnPjsEditor = () => { setTimeout(() => { dispatch(setLoading(false)) }, 1200) } catch (e) { - console.log(e) + //console.log(e) } }) diff --git a/src/pages/search/components/commands.tsx b/src/pages/search/components/commands.tsx index 4884304..6ef0149 100644 --- a/src/pages/search/components/commands.tsx +++ b/src/pages/search/components/commands.tsx @@ -158,7 +158,7 @@ const SearchCommands = () => { dispatch(setSearchResults(items, groups, res)); } } else { - console.log('Injection failed: ', injectionResults); + //console.log('Injection failed: ', injectionResults); } dispatch(rootActions.setLoading(false)); } diff --git a/src/pages/search/components/searchqueryform.tsx b/src/pages/search/components/searchqueryform.tsx index 3989fac..abce5d5 100644 --- a/src/pages/search/components/searchqueryform.tsx +++ b/src/pages/search/components/searchqueryform.tsx @@ -219,7 +219,7 @@ const SearchQueryForm = () => { defaultSelectedKey={sourceIds.find((item) => item.key === searchQuery.SourceId)?.key ?? null} allowFreeform onChange={(event, option?: any, index?: any, value?: any) => { - console.log(option, index, value); + //console.log(option, index, value); dispatch( setSearchQuery({ ...searchQuery, diff --git a/src/pages/search/components/searchresults.tsx b/src/pages/search/components/searchresults.tsx index a185ced..60e93c8 100644 --- a/src/pages/search/components/searchresults.tsx +++ b/src/pages/search/components/searchresults.tsx @@ -230,7 +230,7 @@ const SearchResults = () => { dispatch(setSearchResults(newItems2, newGroups, searchResults)); dispatch(rootActions.setLoading(false)); } else { - console.log('Injection failed: ', injectionResults); + //console.log('Injection failed: ', injectionResults); dispatch(rootActions.setLoading(false)); } }); diff --git a/src/pages/spshooter/chrome/shoot.ts b/src/pages/spshooter/chrome/shoot.ts index 2a443fd..1a0d098 100644 --- a/src/pages/spshooter/chrome/shoot.ts +++ b/src/pages/spshooter/chrome/shoot.ts @@ -100,7 +100,7 @@ export const shoot = (payload: any, extPath: string) => { }); } else { // not an HttpRequestError so we just log message - console.log(error); + //console.log(error); } return { success: false, diff --git a/src/pages/webproperties/chrome/getwebproperties.ts b/src/pages/webproperties/chrome/getwebproperties.ts index 36b0491..b9a2d8e 100644 --- a/src/pages/webproperties/chrome/getwebproperties.ts +++ b/src/pages/webproperties/chrome/getwebproperties.ts @@ -77,7 +77,7 @@ export const getWebProperties = (extPath: string) => { }); } else { // not an HttpRequestError so we just log message - console.log(error); + //console.log(error); } return { success: false, diff --git a/src/popup/Components/ChangePageLayout.tsx b/src/popup/Components/ChangePageLayout.tsx index 36c1b8d..75b8757 100644 --- a/src/popup/Components/ChangePageLayout.tsx +++ b/src/popup/Components/ChangePageLayout.tsx @@ -101,7 +101,7 @@ const ChangePageLayout = ({ plo, tabId, ctx }: IQuickLinkListProps) => { args: [ctx.webAbsoluteUrl, ctx.serverRequestPath, selected], func: updatePageLayout, }).then(injectionResults => { - console.log(injectionResults); + //console.log(injectionResults); setShowSuccess(true); })} text="Save" diff --git a/src/popup/Components/LoadTeamsDebug.tsx b/src/popup/Components/LoadTeamsDebug.tsx index 553563a..552a97e 100644 --- a/src/popup/Components/LoadTeamsDebug.tsx +++ b/src/popup/Components/LoadTeamsDebug.tsx @@ -26,7 +26,7 @@ const LoadTeamsDebug = ({ tabId }: any) => { func: loadTeamsDebugScript, }) .then((injectionResults) => { - console.log(injectionResults); + //console.log(injectionResults); }) } /> diff --git a/src/popup/Components/QuickLinkList.tsx b/src/popup/Components/QuickLinkList.tsx index b57cf12..bbbbe91 100644 --- a/src/popup/Components/QuickLinkList.tsx +++ b/src/popup/Components/QuickLinkList.tsx @@ -102,6 +102,22 @@ const QuickLinkList = ({ ctx, appCatalogUrl, tabUrl }: IQuickLinkListProps) => { '/_layouts/15/searchadmin/TA_SearchAdministration.aspx' } /> + + { disabled={!ctx || !ctx.webAbsoluteUrl} url={ctx.webAbsoluteUrl + '/_layouts/15/settings.aspx'} /> +