tag-browser: Some small improvements
This patch makes tag-browser layout somewhat usable on mobile. Additionally it adds few banner hints to use Ctrl keys and basic hint to select a category when empty. This also makes the Copy-button hidden until some content is shown in code-block.
This commit is contained in:
@@ -48,9 +48,11 @@ class CodeBlock extends HTMLElement{
|
||||
let parts = this.dataset.matchlinks.split(" -> ");
|
||||
// this is kinda sketchy
|
||||
if(parts.length === 2){
|
||||
const from = parts[0];
|
||||
const to = parts[1];
|
||||
try{
|
||||
this.highlighter.linkMatcher = new RegExp(parts[0],"g");
|
||||
this.highlighter.linkGenerator = (a) => (parts[1].replace("%s",a));
|
||||
this.highlighter.linkMatcher = new RegExp(from,"g");
|
||||
this.highlighter.linkGenerator = (a) => (to.replace("%s",a));
|
||||
}catch(e){
|
||||
console.warn(e);
|
||||
this.highlighter.linkMatcher = null;
|
||||
|
||||
Reference in New Issue
Block a user