@@ -13,6 +13,7 @@ const repoPathFromScriptAttribute = () => {
13
13
const rawGitLink = ( repoPath , filePath , commitHash ) => "https://cdn.rawgit.com/" + repoPath + "/" + ( commitHash ? commitHash : "master" ) + filePath
14
14
15
15
const load = ( repoPath , filePath , commitHash ) => {
16
+ console . log ( "would have loaded: " + rawGitLink ( repoPath , filePath , commitHash ) )
16
17
return // disabled for now
17
18
document . body . style . margin = "0 0 0 0px"
18
19
const iframe = document . createElement ( "iframe" )
@@ -50,8 +51,6 @@ const getFileExistsNow = (repoPath, filePath) => fetch(
50
51
. then ( resp => resp . status == 200 )
51
52
52
53
const showBanner = ( repoPath , filePath , status , newCommitHash ) => {
53
- return // disabled for now
54
- // TODO add links to newCommitHash page in banner text
55
54
const onclick = `onclick="window.location.search = '?version=${ newCommitHash } '"`
56
55
const bannerText = {
57
56
"FILE-NEVER-EXISTED" : `This page doesn't exist in our archives.` ,
@@ -62,6 +61,9 @@ const showBanner = (repoPath, filePath, status, newCommitHash) => {
62
61
"NEWER-VERSION-DELETED-AVAILABLE" : `This page has been deleted, but this is not <a ${ onclick } >the most up-to-date version in the archive</a>.`
63
62
} [ status ]
64
63
64
+ console . log ( "would have said: " + bannerText )
65
+ return // disabled for now
66
+
65
67
const iconDiv = document . createElement ( 'span' )
66
68
iconDiv . style . width = "30px"
67
69
iconDiv . style . display = "inline-block"
0 commit comments