Last active
April 28, 2025 15:57
-
-
Save nhymxu/9bcd2fc02fb175eb1a17e571b5e541ca to your computer and use it in GitHub Desktop.
nút nổi copy nhanh nội dung chương vào clipboard
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Ifreeing copy content | |
// @namespace https://dungnt.net/ | |
// @version 2025-04-28 | |
// @description try to take over the world! | |
// @author You | |
// @match https://www.ifreeing.com/read/*.html | |
// @icon https://www.google.com/s2/favicons?sz=64&domain=ifreeing.com | |
// @grant GM_setClipboard | |
// ==/UserScript== | |
// bulk download like https://github.com/lelinhtinh/Userscript/blob/master/truyenFull_downloader/truyenFull_downloader.user.js | |
function content_to_clipboard() { | |
let raw_content = jQuery('#Lab_Contents').text(); | |
GM_setClipboard(raw_content, "text", () => console.log("Copy content to clipboard success!")); | |
alert('Đã copy vào clipboard'); | |
} | |
function float_button() { | |
// Create the floating button | |
var floatingButton = document.createElement('button'); | |
floatingButton.innerText = 'BL copy content'; | |
floatingButton.style.position = 'fixed'; | |
floatingButton.style.bottom = '20px'; | |
floatingButton.style.right = '20px'; | |
floatingButton.style.padding = '10px'; | |
floatingButton.style.backgroundColor = '#4CAF50'; | |
floatingButton.style.color = 'white'; | |
floatingButton.style.border = 'none'; | |
floatingButton.style.borderRadius = '5px'; | |
floatingButton.style.cursor = 'pointer'; | |
floatingButton.style.zIndex = '1000'; | |
// Append the button to the body | |
document.body.appendChild(floatingButton); | |
// Function to simulate the click on the actual publish button | |
floatingButton.addEventListener('click', content_to_clipboard); | |
} | |
(function() { | |
'use strict'; | |
float_button(); | |
// Your code here... | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment