Skip to content

Commit

Permalink
add blockpack to Show Originals locations
Browse files Browse the repository at this point in the history
  • Loading branch information
marcustyphoon committed Aug 9, 2023
1 parent 97f1cc2 commit 858ab8b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/scripts/show_originals.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ const addControls = async (timelineElement, location) => {
controls.dataset.location = location;

const firstPost = timelineElement.querySelector(postSelector);
location === 'blogSubscriptions'
['blogSubscriptions', 'blogpack'].includes(location)
? firstPost?.before(controls)
: firstPost?.parentElement?.prepend(controls);

Expand Down Expand Up @@ -72,8 +72,8 @@ const getLocation = timelineElement => {
const on = {
dashboard: timeline === '/v2/timeline/dashboard',
peepr: isInBlogView && !isSinglePostBlogView,
blogSubscriptions: timeline.includes('blog_subscriptions') || which === 'blog_subscriptions'

blogSubscriptions: timeline.includes('blog_subscriptions') || which === 'blog_subscriptions',
blogpack: timeline.includes('blogpack') || which === 'blogpack'
};
const location = Object.keys(on).find(location => on[location]);
const isDisabledBlog = disabledBlogs.some(name => timeline.startsWith(`/v2/blog/${name}/`));
Expand Down

0 comments on commit 858ab8b

Please sign in to comment.