mirror of
https://github.com/gamaio/unps.us-Shortener.git
synced 2025-07-30 13:50:17 +00:00
Change layout of theme and move most javascript to assets
To change the theme (change to the dark background) go to http://unps.us/?newbg Other changes include redesigning the form area to make them look like buttons that automatically resize depending on which one is selected.
This commit is contained in:
BIN
assets/images/newbody.jpg
Normal file
BIN
assets/images/newbody.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 83 KiB |
50
assets/js/unps.core.js
Normal file
50
assets/js/unps.core.js
Normal file
@@ -0,0 +1,50 @@
|
||||
jQuery(document).ready(function(){
|
||||
// When the page loads, we're gonna want to hide the shorten-password and report-details elements
|
||||
$("#shorten-password").slideUp("fast");
|
||||
$("#report-details").slideUp("fast");
|
||||
$('#link').focus();
|
||||
|
||||
$('#error').fadeIn("slow");
|
||||
$('textarea').autoResize();
|
||||
$('#shortlab').addClass('fbtn');
|
||||
});
|
||||
|
||||
$(function() { // Fairly messy. Changes submit button based on radio button and shows/hides shorten-password and report-details elements
|
||||
$("input[type=radio]").on('click', function(){
|
||||
if($('#shorten').is(':checked')){
|
||||
$("#short-button").html('Shorten');
|
||||
$("#report").val('');
|
||||
$("#pass").val('');
|
||||
|
||||
$('#shortlab').addClass('fbtn');
|
||||
$('#dellab').removeClass('fbtn');
|
||||
$('#replab').removeClass('fbtn');
|
||||
}
|
||||
if ($('#dellink').is(':checked')){
|
||||
$("#shorten-password").slideDown("slow");
|
||||
$("#short-button").html('Delete');
|
||||
$("#report").val('');
|
||||
|
||||
$('#shortlab').removeClass('fbtn');
|
||||
$('#dellab').addClass('fbtn');
|
||||
$('#replab').removeClass('fbtn');
|
||||
}else{
|
||||
$("#shorten-password").slideUp("slow");
|
||||
}
|
||||
if($('#replink').is(':checked')){
|
||||
$("#report-details").slideDown("slow");
|
||||
$("#short-button").html('Report');
|
||||
$("#pass").val('');
|
||||
|
||||
$('#shortlab').removeClass('fbtn');
|
||||
$('#dellab').removeClass('fbtn');
|
||||
$('#replab').addClass('fbtn');
|
||||
}else{
|
||||
$("#report-details").slideUp("slow");
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
function copyToClipboard(text){
|
||||
window.prompt ("Copy to clipboard: Ctrl+C, Enter (when closed I will open your link in a new tab)", text);
|
||||
}
|
Reference in New Issue
Block a user