You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I like Heimdall but i want to like have direct access to tags if I'm in category mode. I wrote a small script, but i feel to start a discussion that it maybe make more sense to implement this into the custom app.js.
` $(document).ready(function() {
function getParameterByName(tag, url) {
if (!url) url = window.location.href;
tag = encodeURIComponent(tag).replace(/[\[\]]/g, "\$&");
var regex = new RegExp("[?&]" + tag + "(=([^&#]*)|&|#|$)"), results = regex.exec(url);
if (!results) return null;
if (!results[2]) return '';
return decodeURIComponent(results[2].replace(/\+/g, " "));
}
function hideShowBlocks(tag) {
$('section.item-container').hide();
$('.tag[data-tag="all"]').removeClass('current');
$('.tag.link.white[data-tag="tag-' + tag + '"]').addClass('current');
$('section.item-container.tag-' + tag).show();
}
let tag = getParameterByName('tag');
if(tag === "Home Dashboard"){
console.log("Home Dashboard new into");
tag = "0-dash";
}
if (tag) {
tag = tag.replace(/_/g, '-').toLowerCase();
setTimeout(function() { hideShowBlocks(tag); }, 200);
}
$('body').on('click', '[data-tag]', function() {
const tagText = $(this).text().trim();
const newUrl = window.location.origin + window.location.pathname + '?tag=' + encodeURIComponent(tagText);
history.pushState(null, '', newUrl);
});
});`
Short explanation:
If you click on a category in header, you get the URL like ?tag=cat1 . Now you can choose exactly this URL and you get this page with this category directly. I like it very much. But it's more a hack.
Maybe you are interested in this.
The text was updated successfully, but these errors were encountered:
This issue has been automatically marked as stale because it has not had recent activity. This might be due to missing feedback from OP. It will be closed if no further activity occurs. Thank you for your contributions.
I like Heimdall but i want to like have direct access to tags if I'm in category mode. I wrote a small script, but i feel to start a discussion that it maybe make more sense to implement this into the custom app.js.
` $(document).ready(function() {
});`
Short explanation:
If you click on a category in header, you get the URL like ?tag=cat1 . Now you can choose exactly this URL and you get this page with this category directly. I like it very much. But it's more a hack.
Maybe you are interested in this.
The text was updated successfully, but these errors were encountered: