diff options
author | Rory MacQueen <rorymacqueen@gmail.com> | 2013-08-05 12:42:08 -0700 |
---|---|---|
committer | Rory MacQueen <rorymacqueen@gmail.com> | 2013-08-05 12:42:08 -0700 |
commit | 56acb550bf132af9c2711a9135c9f2b17306a69c (patch) | |
tree | 7fc7625a8b948c364319be9b6dc9fca05ab1edf9 /wikipedia/utils.js | |
parent | efeab93c981aa75021b227f578c5be4df5f1fc62 (diff) |
Dealt with relative paths in wikipedia view
Had to change the way webview loaded the uri so that it can load relative paths
[endlessm/eos-sdk#220]
Diffstat (limited to 'wikipedia/utils.js')
-rw-r--r-- | wikipedia/utils.js | 5 |
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); |