aboutsummaryrefslogtreecommitdiffstats
path: root/config/quickshell/modules/common/functions/file_utils.js
diff options
context:
space:
mode:
Diffstat (limited to 'config/quickshell/modules/common/functions/file_utils.js')
-rw-r--r--config/quickshell/modules/common/functions/file_utils.js9
1 files changed, 9 insertions, 0 deletions
diff --git a/config/quickshell/modules/common/functions/file_utils.js b/config/quickshell/modules/common/functions/file_utils.js
new file mode 100644
index 00000000..758950de
--- /dev/null
+++ b/config/quickshell/modules/common/functions/file_utils.js
@@ -0,0 +1,9 @@
+/**
+ * Trims the File protocol off the input string
+ * @param {string} str
+ * @returns {string}
+ */
+function trimFileProtocol(str) {
+ return str.startsWith("file://") ? str.slice(7) : str;
+}
+
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage