|
@@ -87,21 +87,33 @@
|
|
|
overflow: auto;
|
|
|
}
|
|
|
|
|
|
- #button {
|
|
|
+ .action-panel{
|
|
|
position: fixed;
|
|
|
bottom: 20px;
|
|
|
right: 20px;
|
|
|
+ }
|
|
|
+
|
|
|
+ .action-button {
|
|
|
padding: 8px;
|
|
|
color: #fff;
|
|
|
background-color: #555;
|
|
|
opacity: 0.7;
|
|
|
+ float: left;
|
|
|
+ margin-left: 1px;
|
|
|
}
|
|
|
-
|
|
|
- #button:hover {
|
|
|
+
|
|
|
+ .action-button:hover {
|
|
|
cursor: pointer;
|
|
|
opacity: 1;
|
|
|
}
|
|
|
|
|
|
+ #open-external-button{
|
|
|
+ background-image: url(files/external.svg);
|
|
|
+ background-size: 50%;
|
|
|
+ background-position: 50% 50%;
|
|
|
+ background-repeat: no-repeat;
|
|
|
+ }
|
|
|
+
|
|
|
.filterBlock{
|
|
|
margin: 20px;
|
|
|
position: relative;
|
|
@@ -271,7 +283,12 @@
|
|
|
var container = document.createElement( 'div' );
|
|
|
content.appendChild( container );
|
|
|
|
|
|
+ var panel = document.createElement( 'div' );
|
|
|
+ panel.className = 'action-panel';
|
|
|
+ document.body.appendChild( panel );
|
|
|
+
|
|
|
var button = document.createElement( 'div' );
|
|
|
+ button.className = 'action-button';
|
|
|
button.id = 'button';
|
|
|
button.textContent = 'View source';
|
|
|
button.addEventListener( 'click', function ( event ) {
|
|
@@ -280,7 +297,20 @@
|
|
|
|
|
|
}, false );
|
|
|
button.style.display = 'none';
|
|
|
- document.body.appendChild( button );
|
|
|
+ panel.appendChild( button );
|
|
|
+
|
|
|
+ var button2 = document.createElement( 'a' );
|
|
|
+ button2.className = 'action-button';
|
|
|
+ button2.id = 'open-external-button';
|
|
|
+ button2.innerHTML = ' '
|
|
|
+ button2.addEventListener( 'click', function ( event ) {
|
|
|
+
|
|
|
+ window.open( selected + '.html' );
|
|
|
+ event.preventDefault();
|
|
|
+
|
|
|
+ }, false );
|
|
|
+ button2.style.display = 'none';
|
|
|
+ panel.appendChild( button2 );
|
|
|
|
|
|
var links = {};
|
|
|
var selected = null;
|
|
@@ -303,7 +333,7 @@
|
|
|
var link = document.createElement( 'a' );
|
|
|
link.className = 'link';
|
|
|
link.textContent = name;
|
|
|
- link.href = "#" + file;
|
|
|
+ link.href = file + '.html';
|
|
|
link.addEventListener( 'click', function ( event ) {
|
|
|
|
|
|
if ( event.button === 0 ) {
|
|
@@ -337,9 +367,12 @@
|
|
|
viewer.focus();
|
|
|
|
|
|
button.style.display = '';
|
|
|
+ button2.style.display = '';
|
|
|
|
|
|
selected = file;
|
|
|
|
|
|
+ button2.href = selected + '.html'
|
|
|
+
|
|
|
};
|
|
|
|
|
|
if ( window.location.hash !== '' ) {
|