summaryrefslogtreecommitdiff
path: root/wikipedia/utils.js
diff options
context:
space:
mode:
Diffstat (limited to 'wikipedia/utils.js')
-rw-r--r--wikipedia/utils.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/wikipedia/utils.js b/wikipedia/utils.js
index 0edb6d4..662b2b4 100644
--- a/wikipedia/utils.js
+++ b/wikipedia/utils.js
@@ -47,6 +47,11 @@ function load_file_from_resource(filename) {
return data[0];
}
+function get_uri_for_relative_path(relative_path){
+ let file = Gio.file_new_for_path(relative_path);
+ return file.get_uri();
+}
+
function write_contents_to_file(filename, content){
let file = Gio.file_new_for_path(filename);
file.replace_contents(content, null, false, 0, null);