1
0
Fork 0
mirror of https://github.com/prise6/anywhere synced 2024-05-06 06:23:10 +02:00

getting closer

- got rid of useless elements
- starting to get a nice drag-and-droppable link
This commit is contained in:
raph 2016-05-02 00:13:05 +02:00
parent ce01ad1534
commit f7c234055d
2 changed files with 20 additions and 55 deletions

View file

@ -31,65 +31,25 @@
<body>
<div class="demo-layout-transparent mdl-layout mdl-js-layout">
<main class="mdl-layout__content">
<div class="icon-zone">
<i class="material-icons">open_with</i>
<i class="material-icons">flip_to_back</i>
<i class="material-icons md-48 orange600">open_in_browser</i>
<h3>put this bookmarklet in your fav bar :</h3>
<div class="code-zone">
<h4>Drag <a href="javascript:(function(t,e){for(var a=Array.prototype.slice.call(document.getElementsByTagName('a')),o=new RegExp('^(javascript|mailto|(https?)?'+e+'/?#)'),n=!1;!n&a.length>0;)i=Math.floor(Math.random()*a.length),o.test(a[i].href)||a[i].href==e?a.splice(i,1):(t=a[i].href,n=!0);document.location.href=t})('http://swapthatlink.com',document.location.href);
" id="anywhere"> <i class="material-icons">insert_drive_file</i> this link</a> in your fav bar.</h4>
<script src="https://gist.github.com/raphisky/b5bf1c969f11a60288e2828f86faf5a1.js"></script>
<div class="icon-zone">
<i class="material-icons">open_with</i>
<i class="material-icons">flip_to_back</i>
<i class="material-icons md-48 orange600">open_in_browser</i>
</div>
</div>
<h3>drag & drop this bookmarklet into your fav bar.</h3>
<h3>Then, continue browsing as usual.</h3>
<h3>When you click it, it <b>follows any link on the page.</b></h3>
<h4>Click it anytime, it will take you anywhere.</h3>
<h4>Basically, <b> it follows any link on any page.</b></h3>
<h1>We have no idea what happens next.</h1>
<button class="mdl-button mdl-js-button mdl-button--raised mdl-button--colored">
Button
</button>
<button id="demo-show-toast" class="mdl-button mdl-js-button mdl-button--raised" type="button">Show Toast</button>
<div id="demo-toast-example" class="mdl-js-snackbar mdl-snackbar">
<div class="mdl-snackbar__text"></div>
<button class="mdl-snackbar__action" type="button"></button>
</div>
<h4>Happy browsing.</h4>
</main>
</div>
<script>
(function() {
'use strict';
window['counter'] = 0;
var snackbarContainer = document.querySelector('#demo-toast-example');
var showToastButton = document.querySelector('#demo-show-toast');
showToastButton.addEventListener('click', function() {
'use strict';
var data = {message: 'Example Message # ' + ++counter};
snackbarContainer.MaterialSnackbar.showSnackbar(data);
});
}());
</script>
<script>
(function() {
'use strict';
var snackbarContainer = document.querySelector('#demo-snackbar-example');
var showSnackbarButton = document.querySelector('#demo-show-snackbar');
var handler = function(event) {
showSnackbarButton.style.backgroundColor = '';
};
showSnackbarButton.addEventListener('click', function() {
'use strict';
showSnackbarButton.style.backgroundColor = '#' +
Math.floor(Math.random() * 0xFFFFFF).toString(16);
var data = {
message: 'Button color changed.',
timeout: 2000,
actionHandler: handler,
actionText: 'Undo'
};
snackbarContainer.MaterialSnackbar.showSnackbar(data);
});
}());
</script>
<script src="https://code.getmdl.io/1.1.3/material.min.js"></script>
</body>

View file

@ -2,3 +2,8 @@ body {
background: #EEEEEE;
text-align:center;
}
.code-zone {
width: 400px;
margin:auto;
}