Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion frontend/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "sleeky-frontend",
"version": "2.5.0",
"version": "2.6.0",
"description": "",
"main": "index.js",
"scripts": {
Expand Down
4 changes: 1 addition & 3 deletions user/plugins/sleeky-backend/assets/js/theme.js
Original file line number Diff line number Diff line change
Expand Up @@ -136,9 +136,7 @@ $( document ).ready(function() {
} else if (/Powered by/.test($(this).text())) {
// Update footer
var content = $(this).html();
var i = 77
var updated_content = "Running on" + content.slice(13, i) + ' & <a href="https://sleeky.flynntes.com/" title="Sleeky">Sleeky</a>' + content.slice(i-0)
$(this).html(updated_content);
var updated_content = `${content.replace(/Powered by.*?(?=<|$)/i, '')} <br> <a href="https://sleeky.flynntes.com/" title="Sleeky">Sleeky</a> v 2.6.0`; $(this).html(updated_content);
}
});
});
10 changes: 5 additions & 5 deletions user/plugins/sleeky-backend/plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Plugin Name: Sleeky Backend
Plugin URI: https://sleeky.flynntes.com
Description: UI overhaul of the YOURLS backend
Version: 2.4.1
Version: 2.6.0
Author: Flynn Tesoriero
Author URI: https://flynntes.com
*/
Expand Down Expand Up @@ -92,14 +92,14 @@ function sleeky_do_settings_page() {
if( isset( $_POST['theme_choice'] ) ) {
// Check nonce
yourls_verify_nonce( 'sleeky_settings' );

// Process form
sleeky_settings_update();
}

// Get value from database
$theme_choice = yourls_get_option( 'theme_choice' );

// Create nonce
$nonce = yourls_create_nonce( 'sleeky_settings' );

Expand All @@ -124,7 +124,7 @@ function sleeky_do_settings_page() {
// Update option in database
function sleeky_settings_update() {
$in = $_POST['theme_choice'];

if( $in ) {
// Validate theme_choice. ALWAYS validate and sanitize user input.
// Here, we want an integer
Expand All @@ -135,7 +135,7 @@ function sleeky_settings_update() {
} else {
echo "Error";
}

}
}

Expand Down