Sha256: 3a4a7fdab7cd390ae4f2264aa535a3e8597bbfc73bb26cbc4f1986be464712f5
Contents?: true
Size: 564 Bytes
Versions: 10
Compression:
Stored size: 564 Bytes
Contents
<%# Locals: url %> <script type="text/javascript"> var url = <%= url.to_json %>; var hash = document.location.hash; // Remove leading # from the fragment if (hash.charAt(0) == '#') { hash = hash.substr(1); } // Remove leading / from the fragment if the URL already ends in a / // This prevents double-slashes. Note we can't just replace all // double-slashes because the protocol includes //. if (url.charAt(url.length - 1) == '/' && hash.charAt(0) == '/') { hash = hash.substr(1); } document.location.href = url + hash; </script>
Version data entries
10 entries across 10 versions & 1 rubygems