logseq custom.js and custom.css utilities : resize query table columns, hide namespaces...

Overview

logseq-custom-files

custom.js and custom.css utilities for Logseq.

current version v20220331

  • query table view : add handles on the query table headers to resize column width (not persistent) 20220312_NUC8_M49yriOEAH

  • namespace prefixes collapser : collapse namespace prefixes eg: [[prefix/page/test]] becomes [[../test]] (use the hover tootip to see the original name or enter edit mode) 20220314_NUC8_cMu56YIkrd

How-to use/install

  • if you are not using any custom.js1 or custom.css, copy the files into your %graph-name%/logseq/ folder.
  • alternatively, if you don't want to overwrite your current files or are only interested in some of the utilites, open the each file with a text editor/code editor then copy-paste the relevant sections into your own custom.js/custom.css files (some utilities require to copy sections from both custom.js and custom.css to work, also make sure to include the mutation observer declaration at the start of the custom.js), use the search function to find the relevant snippets delimited by comments with descriptive names.

help me improve the utilities

  • I'm glad to accept Pull Requests if you know how to improve or optimize the utilities
  • if you find this useful, you can also buy me a coffee :)

    ko-fi

more js snippets and css customizations are coming soon, stay tuned

changelog

  • v20220331 : fix sorting : resizer handle was overlapping the table headers. moved style to custom.css
  • v20220329 : fix for advanced queries

Footnotes

    • custom.js has been introduced in logseq on 2021-11-10, see details here logseq/logseq#2943
    • the custom.js file is not created by the default installer, it has to be created manually in /logseq
    • Before executing the code, the user will be asked for execution permission.
    • When the content of the custom.js file is modified, it needs to be restarted or refreshed to take effect.
You might also like...

↕️ A little Alpine.js plugin to automatically resize a textarea to fit its content.

↕️ Alpine Autosize ↕️ A little Alpine.js plugin to automatically resize a textarea to fit its content. 🚀 Installation CDN Include the following scri

Nov 5, 2022

JavaScript library to resize, reduce, or change ranges of DOM elements.

Range.js JavaScript library to resize, reduce, or change ranges of DOM elements using the HTML5 input type="range" element. Usage: Include range.js

Jun 3, 2021

Airbnb-sanity - 🧳 Chrome extension to hide Airbnb listings you don't like

Airbnb-sanity - 🧳 Chrome extension to hide Airbnb listings you don't like

Airbnb Sanity 🧳 Coming soon to the Chrome Webstore! Chrome extension to hide Airbnb listings you don't like. Tired of looking through the same Airbnb

Apr 4, 2022

It's a scam app, you can hide evil code in it, it will evade 100% of anti-viruses. There is an electron interface for a better social-ing

It's a scam app, you can hide evil code in it, it will evade 100% of anti-viruses. There is an electron interface for a better social-ing

Zcrypt Fake Miner Our Website https://dark-utilities.me ! How to build PS C:\Users\Admin git clone https://github.com/Inplex-sys/zcrypt-fake-miner.gi

Oct 13, 2022

Query for CSS brower support data, combined from caniuse and MDN, including version support started and global support percentages.

css-browser-support Query for CSS browser support data, combined from caniuse and MDN, including version support started and global support percentage

Nov 2, 2022

A table component for your Mantine data-rich applications, supporting asynchronous data loading, column sorting, custom cell data rendering, row context menus, dark theme, and more.

A table component for your Mantine data-rich applications, supporting asynchronous data loading, column sorting, custom cell data rendering, row context menus, dark theme, and more.

Mantine DataTable A "dark-theme aware" table component for your Mantine UI data-rich applications, featuring asynchronous data loading support, pagina

Jan 4, 2023

Base provides advanced Promise Queue Manager, Custom Console Logger and other utilities.

Base Base provides frequently used functionality like cutome logger, response helper, Custom Promise and Instance composer. These are used in almost a

Jun 14, 2022

A complete media query framework for CSS, to apply specific properties in specific screen

A complete media query framework for CSS, to apply specific properties in specific screen

A complete media query framework for CSS, to apply specific properties in specific screen Note: Size of every media query is `50px, 100px, 150px, 200p

Aug 23, 2022

Toaster is a Pure Javascript plugin for displaying toast notifications. It comes with different options e.g custom text or HTML message, duration, custom class, toggle close button, position, custom close icon and backgorund color.

Pure Javascript Toaster Requires Nothing Demo Toaster is a Pure Javascript plugin for displaying toast notifications. It comes with different options

Jun 21, 2022
Comments
  • Possible improvement

    Possible improvement

    Hey!

    I think that in the script to make the namespaces shorter there is a part which doesn't work. In the file custom.js at this line you have 'a.page-ref[data-ref*="/"]:not(.hidden-namespace)'. If I understand it correctly, the :not(.hidden-namespace) part should ensure that nodes with that class are not selected.

    But when I put a console.log(nmsp) right after that part it logged a NodeList which still included all the nodes with that class.

    So I think maybe what happens is that the script processes every node everytime it runs. I'm not entirely sure though, just thought I'd point it out.

    opened by dominiwe 1
  • Add a license

    Add a license

    I took some of your code here (mainly the part which makes namespaces more pleasant) and changed it a little for a theme I am working on.

    I would like to put my theme on GitHub but unfortunately this repository does not contain a license. Because there is no license, your code is not open source nor free. So I cannot use, redistribute or modify it.

    I would recommend that you add an open source license, which would allow me to reuse some of your code while you still retain the copyright. Thank you :)

    opened by dominiwe 0
Owner
null
Javascript Library to create scrollable table with infinite rows and columns.

Fattable Demo Checkout the demo here. What is it? Fattable is a javascript Library to create table with infinite scroll, with infinite number of rows

Paul Masurel 477 Sep 19, 2022
Ready to manipulate partitions file? Create a custom partition, apply custom security system, hide the partition and share your hidden data on the www

Paranoia ?? Ready to manipulate partitions file? Create a custom partition, apply custom security system, hide the partition and share your hidden dat

Alice Snow 3 Dec 29, 2022
Logseq-craft-theme - Craft Theme for Logseq

Craft for Logseq Almost all creativity requires purposeful play. A Craft insprir

Alexander Rink 33 Oct 26, 2022
An npm package with Tailwind CSS utility classes for creating responsive grid columns without media queries using auto fit.

Grid Auto Fit for Tailwind CSS A plugin that helps you create a responsive grid layout in Tailwind CSS without using media queries. It uses the auto-f

Thirus 80 Dec 28, 2022
A simple query builder, it will helps to develop DSL query for Elasticsearch

Elasticsearch Dynamic Query Builder A simple query builder, it will helps to develop DSL query for elasticsearch Installation You can start it from np

Hashemi Rafsan 4 Nov 20, 2022
Collection of Rowy's templates for cloud functions cod snippets - including for derivative, action columns and extensions.

Rowy Templates Collection of Rowy's backend templates and code snippets for cloud functions - including for derivative, action columns and extensions.

Rowy 4 Nov 16, 2022
A plugin for the Obsidian markdown note application, adding functionality to render markdown documents with multiple columns of text.

Multi-Column Markdown Take your boring markdown document and add some columns to it! With Multi Column Markdown rather than limiting your document lay

Cameron Robinson 91 Jan 2, 2023
✏️ A small jQuery extension to turn a static HTML table into an editable one. For quickly populating a small table with JSON data, letting the user modify it with validation, and then getting JSON data back out.

jquery-editable-table A small jQuery extension to turn an HTML table editable for fast data entry and validation Demo ?? https://jsfiddle.net/torrobin

Tor 7 Jul 31, 2022
Another table select prompt plugin of inquirer.js, with powerful table render and filters.

inquirer-table-select-prompt Table row selection prompt for Inquirer.js 动机 现有的 inquirer.js 没有支持表格行选中的命令行交互的插件. 社区内能查找到的,只有一个二维数组的 checkbox,eduardobouc

锂电 3 Jan 7, 2023
Dynamically resize, format and optimize images based on url modifiers.

Local Image Sharp Dynamically resize, format and optimize images based on url modifiers. Table of Contents ✨ Features ?? Installation ?? Usage Contrib

Strapi Community 30 Nov 29, 2022