linux nautilus: Fix 'Copy Web Link' for Github. Closes #800
This commit is contained in:
parent
663488d06d
commit
15741da4d6
|
@ -88,7 +88,7 @@ class SparkleShareExtension (nautilus.MenuProvider):
|
||||||
if "gitorious.org" in url:
|
if "gitorious.org" in url:
|
||||||
url = "http://" + url + "/blobs/master" + relative_path
|
url = "http://" + url + "/blobs/master" + relative_path
|
||||||
if "github.com" in url:
|
if "github.com" in url:
|
||||||
url = "http://" + url + "/raw/master" + relative_path
|
url = "https://" + url + "/master" + relative_path
|
||||||
|
|
||||||
url = url.replace (" ", "%20");
|
url = url.replace (" ", "%20");
|
||||||
|
|
||||||
|
|
|
@ -83,7 +83,7 @@ class SparkleShareExtension (GObject.GObject, Nautilus.MenuProvider):
|
||||||
elif "github.com" in host:
|
elif "github.com" in host:
|
||||||
# ssh://git@github.com/hbons/SparkleShare.git
|
# ssh://git@github.com/hbons/SparkleShare.git
|
||||||
# https://raw.github.com/hbons/SparkleShare/master/README
|
# https://raw.github.com/hbons/SparkleShare/master/README
|
||||||
url = "http://raw.github.com/" + urllib.quote(origin_path.rstrip(".git")) + "/raw/master/" + urllib.quote(relative_path)
|
url = "https://raw.github.com/" + urllib.quote(origin_path.rstrip(".git")) + "/master/" + urllib.quote(relative_path)
|
||||||
else:
|
else:
|
||||||
# https://git.one-gear.com/?p=thansen/Public.git;a=blob;f=SparkleShare.txt;hb=HEAD
|
# https://git.one-gear.com/?p=thansen/Public.git;a=blob;f=SparkleShare.txt;hb=HEAD
|
||||||
url = "http://" + host + "/?p=" + urllib.quote(origin_path) +";a=blob;f=" + urllib.quote(relative_path) + ";hb=HEAD"
|
url = "http://" + host + "/?p=" + urllib.quote(origin_path) +";a=blob;f=" + urllib.quote(relative_path) + ";hb=HEAD"
|
||||||
|
|
Loading…
Reference in a new issue