Disable referrer (TNL-1144)
This commit is contained in:
committed by
Adam Palay
parent
753a3be75e
commit
a1ffcc5259
10
common/static/js/vendor/noreferrer.js
vendored
Normal file
10
common/static/js/vendor/noreferrer.js
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
/*
|
||||
jquery.noreferrer.js, version 0.1.3
|
||||
https://github.com/knu/noreferrer
|
||||
|
||||
Copyright (c) 2011 Akinori MUSHA
|
||||
Licensed under the 2-clause BSD license.
|
||||
*/
|
||||
(function(){(function(){$.browser.webkit||$.event.add(window,"load",function(){$("a[href][rel~=noreferrer], area[href][rel~=noreferrer]").each(function(){var b,e,c,g,d,f,h;b=this;c=b.href;$.browser.opera?(b.href="http://www.google.com/url?q="+encodeURIComponent(c),b.title||(b.title="Go to "+c)):(d=!1,g=function(){b.href="javascript:void(0)"},f=function(){b.href=c},$(b).bind("mouseout mouseover focus blur",f).mousedown(function(a){a.which===2&&(d=!0)}).blur(function(){d=!1}).mouseup(function(a){if(!(a.which===
|
||||
2&&d))return!0;g();d=!1;setTimeout(function(){alert("Middle clicking on this link is disabled");f()},500);return!1}),e="<html><head><meta http-equiv='Refresh' content='0; URL="+$("<p/>").text(c).html()+"' /></head><body></body></html>",$.browser.msie?$(b).click(function(){var a;switch(a=this.target||"_self"){case "_self":case window.name:a=window;break;default:a=window.open(null,a)}a=a.document;a.clear();a.write(e);a.close();return!1}):(h="data:text/html;charset=utf-8,"+
|
||||
encodeURIComponent(e),$(b).click(function(){this.href=h;return!0})))})})})()}).call(this);
|
||||
@@ -2,7 +2,6 @@
|
||||
<%! from django.core.urlresolvers import reverse %>
|
||||
<%! from django.utils.translation import ugettext as _ %>
|
||||
<%namespace name='static' file='static_content.html'/>
|
||||
|
||||
## WARNING: These files are specific to edx.org and are not used in installations outside of that domain. Open edX users will want to use the file "footer.html" for any changes or overrides.
|
||||
<div class="wrapper wrapper-footer edx-footer edx-footer-new">
|
||||
<footer id="footer-global" class="footer-global" role="contentinfo" aria-label="Footer">
|
||||
@@ -65,31 +64,31 @@
|
||||
<div class="footer-follow-links">
|
||||
## Translators: This is the website name of www.twitter.com. Please
|
||||
## translate this the way that Twitter advertises in your language.
|
||||
<a href="${settings.PLATFORM_TWITTER_URL}" title="${_("Twitter")}">
|
||||
<a href="${settings.PLATFORM_TWITTER_URL}" title="${_("Twitter")}" rel="noreferrer">
|
||||
<i class="icon fa fa-twitter element-invisible"></i>
|
||||
<span class="copy">${_("Twitter")}</span>
|
||||
</a>
|
||||
## Translators: This is the website name of www.facebook.com. Please
|
||||
## translate this the way that Facebook advertises in your language.
|
||||
<a href="${settings.PLATFORM_FACEBOOK_ACCOUNT}" title="${_("Facebook")}">
|
||||
<a href="${settings.PLATFORM_FACEBOOK_ACCOUNT}" title="${_("Facebook")}" rel="noreferrer">
|
||||
<i class="icon fa fa-facebook element-invisible"></i>
|
||||
<span class="copy">${_("Facebook")}</span>
|
||||
</a>
|
||||
## Translators: This is the website name of www.meetup.com. Please
|
||||
## translate this the way that Meetup advertises in your language.
|
||||
<a href="${settings.PLATFORM_MEETUP_URL}" title="${_("Meetup")}">
|
||||
<a href="${settings.PLATFORM_MEETUP_URL}" title="${_("Meetup")}" rel="noreferrer">
|
||||
<i class="icon fa fa-calendar element-invisible"></i>
|
||||
<span class="copy">${_("Meetup")}</span>
|
||||
</a>
|
||||
## Translators: This is the website name of www.linked.com. Please
|
||||
## translate this the way that LinkedIn advertises in your language.
|
||||
<a href="${settings.PLATFORM_LINKEDIN_URL}" title="${_("LinkedIn")}">
|
||||
<a href="${settings.PLATFORM_LINKEDIN_URL}" title="${_("LinkedIn")}" rel="noreferrer">
|
||||
<i class="icon fa fa-linkedin element-invisible"></i>
|
||||
<span class="copy">${_("LinkedIn")}</span>
|
||||
</a>
|
||||
## Translators: This is the website name of plus.google.com. Please
|
||||
## translate this the way that Google+ advertises in your language.
|
||||
<a href="${settings.PLATFORM_GOOGLE_PLUS_URL}" title="${_("Google+")}">
|
||||
<a href="${settings.PLATFORM_GOOGLE_PLUS_URL}" title="${_("Google+")}" rel="noreferrer">
|
||||
<i class="icon fa fa-google-plus element-invisible"></i>
|
||||
<span class="copy">${_("Google+")}</span>
|
||||
</a>
|
||||
@@ -113,3 +112,6 @@
|
||||
</div>
|
||||
</footer>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript" src="/static/js/vendor/noreferrer.js" charset="utf-8"></script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user