Plugin Directory

Changeset 3308017


Ignore:
Timestamp:
06/08/2025 04:28:12 AM (10 months ago)
Author:
brainywpbd
Message:

Added: Disable write click
Fix: CSS issues

Location:
minifly
Files:
32 added
5 edited

Legend:

Unmodified
Added
Removed
  • minifly/trunk/assets/css/global-style.css

    r3299428 r3308017  
    2222.sapmfly-admin-top-banner {
    2323    display: flex;
    24     justify-content: space-between;
     24    justify-content: flex-start;
    2525    align-items: center;
    2626    background: #4CAF50;
     
    6868    align-items: center;
    6969    flex-wrap: wrap;
     70    margin-left: auto;
    7071}
    7172
     
    8990}
    9091
    91 .clear {
    92     display: none;
     92
     93
     94.clear::after {
     95    content: "";
     96    display: table;
     97    clear: both;
    9398}
    9499
  • minifly/trunk/assets/js/user-script.js

    r3301074 r3308017  
    5151    });
    5252});
     53
     54// Code for disable mouse right click
     55
     56document.addEventListener('DOMContentLoaded', function () {
     57    let lastMouseX = 100;
     58    let lastMouseY = 100;
     59
     60    // Track last mouse position
     61    document.addEventListener('mousemove', function (e) {
     62        lastMouseX = e.pageX;
     63        lastMouseY = e.pageY;
     64    });
     65
     66    // Show message
     67    function sapmflyShowMessage(x, y) {
     68        const oldMsg = document.getElementById('sapmfly-rightclick-msg');
     69        if (oldMsg) oldMsg.remove();
     70
     71        const msg = document.createElement('div');
     72        msg.id = 'sapmfly-rightclick-msg';
     73        msg.innerText = 'Oops! Unauthorized copying of content is not permitted.';
     74        msg.style.position = 'absolute';
     75        msg.style.left = x + 'px';
     76        msg.style.top = y + 'px';
     77        msg.style.padding = '6px 12px';
     78        msg.style.background = '#000';
     79        msg.style.color = '#fff';
     80        msg.style.borderRadius = '6px';
     81        msg.style.fontSize = '14px';
     82        msg.style.zIndex = '99999';
     83        msg.style.pointerEvents = 'none';
     84        msg.style.opacity = '0.9';
     85        msg.style.transition = 'opacity 0.3s ease';
     86
     87        document.body.appendChild(msg);
     88
     89        setTimeout(() => {
     90            msg.style.opacity = '0';
     91            setTimeout(() => msg.remove(), 300);
     92        }, 1000);
     93    }
     94
     95    // Disable right-click
     96    document.addEventListener('contextmenu', function (e) {
     97        e.preventDefault();
     98        sapmflyShowMessage(e.pageX, e.pageY);
     99    });
     100
     101    // Disable copy (but allow text selection)
     102    document.addEventListener('copy', function (e) {
     103        e.preventDefault();
     104        sapmflyShowMessage(lastMouseX, lastMouseY);
     105    });
     106});
  • minifly/trunk/minifly.php

    r3303871 r3308017  
    44 * Plugin URI:        https://brainywp.com/minifly/
    55 * Description:       Minifly is your favorite, lightweight companion for better performance. Supercharge your site with tiny tools that make a big difference.
    6  * Version:           1.0.2
     6 * Version:           1.0.3
    77 * Requires at least: 5.2
    88 * Requires PHP:      7.2
  • minifly/trunk/readme.txt

    r3303871 r3308017  
    11=== Minifly - Supercharge your site with tiny tools that make a big difference ===
    22Contributors: brainywpbd, asadullah96
    3 Tags: minifly
     3Tags: custom dashboard, white label, admin tools, WooCommerce option, theme customization, minifly
    44Requires at least: 5.2
    55Tested up to: 6.8
    6 Stable tag: 1.0.2
     6Stable tag: 1.0.3
    77Requires PHP: 7.2
    88License: GPLv2 or later
    99License URI: https://www.gnu.org/licenses/gpl-2.0.html
    1010
    11 Minifly is your free, lightweight WordPress small action plugin for better performance.
     11Minifly is a lightweight WordPress action plugin for better performance, admin tools, WooCommerce option and many more.
    1212
    1313== Description ==
     
    1919* Add progress bar in full site - You can add a site wide progress bar. It improve user experience and increase user's session in the website.
    2020* Enable back to top button - You can enable 'back to top' button in your site with this feature.
     21* Disable mouse right click - You can now protect your site content by disable mouse right click. This also disable copy content on the site.
    2122
    2223**WordPress White Label** - We have features to that allow the users to build and setup there own brands. Making it more professional and clean. This is **fully pro** feature but currently this feature is in free version for limited time.
     
    4546== Changelog ==
    4647
     48= 1.0.3 (7 June 2025) =
     49Added: Disable mouse right click
     50Fix: CSS issues fixed
     51
    4752= 1.0.2 (31 May 2025) =
    4853Added: White label options Added
     
    5661= 1.0.0 (23 May 2025) =
    5762* Initial release
    58 
  • minifly/trunk/templates/user/user-setup.php

    r3301074 r3308017  
    5050            $enable_back_top_button = isset($_POST['sapmfly_enable_back_top_button']) ? 'yes' : 'no';
    5151            update_option('sapmfly_enable_back_top_button', $enable_back_top_button);
     52
     53            $disable_mouse_right_click_btn = isset($_POST['sapmfly_disable_mouse_right_click_button']) ? 'yes' : 'no';
     54            update_option('sapmfly_disable_mouse_right_click_button', $disable_mouse_right_click_btn);
     55
    5256        } else {
    5357            wp_die(esc_html__('Security check failed. Please try again.', 'minifly'));
     
    5862    $progress_enabled = get_option('sapmfly_enable_progress_bar', 'no');
    5963    $back_top_enabled = get_option('sapmfly_enable_back_top_button', 'no');
     64    $disable_mouse_right_click = get_option('sapmfly_disable_mouse_right_click_button', 'no');
    6065?>
    6166
     
    95100                    <br><br>
    96101
     102                    <!-- Disable mouse right click -->
     103                    <label class="sapmfly-switch">
     104                        <?php echo esc_html__('Disable mouse right click', 'minifly'); ?>&nbsp;&nbsp;&nbsp;
     105                        <input type="checkbox" name="sapmfly_disable_mouse_right_click_button" <?php checked($disable_mouse_right_click, 'yes'); ?> />
     106                        <span class="sapmfly-slider"></span>
     107                    </label>
     108                    <br><br>
     109
    97110                    <button type="submit" name="sapmfly_save_settings" class="button button-primary">Save Changes</button>
    98111                </form>
Note: See TracChangeset for help on using the changeset viewer.