Skip to content

Commit

Permalink
Remove org and site from custom editor
Browse files Browse the repository at this point in the history
  • Loading branch information
auniverseaway committed Jan 28, 2025
1 parent 5a44c60 commit 705e346
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions blocks/browse/da-browse/da-browse.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ export default class DaBrowse extends LitElement {

// Sort by length in descending order (longest first)
const matchedConf = matchedConfs.sort((a, b) => b.length - a.length)[0];
console.log(matchedConf);

Check warning on line 80 in blocks/browse/da-browse/da-browse.js

View workflow job for this annotation

GitHub Actions / Running tests (20.x)

Unexpected console statement

return matchedConf.split('=')[1];
}
Expand Down
6 changes: 6 additions & 0 deletions blocks/browse/shared.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@ export default function getEditPath({ path, ext, editor }) {
if (ext === 'html' || ext === 'json') {
const route = ext === 'html' ? editor : '/sheet#';
const lastIndex = path.lastIndexOf(`.${ext}`);

if (route.includes('experience.adobe.com')) {
console.log(`${route}/${path.substring(0, lastIndex).split('/').slice(3).join('/')}`);

Check warning on line 7 in blocks/browse/shared.js

View workflow job for this annotation

GitHub Actions / Running tests (20.x)

Unexpected console statement
return `${route}/${path.substring(0, lastIndex).split('/').slice(3).join('/')}`;
}

return `${route}${path.substring(0, lastIndex)}`;
}
return `/media#${path}`;
Expand Down

0 comments on commit 705e346

Please sign in to comment.