Skip to content

Instantly share code, notes, and snippets.

@daithinh
daithinh / pdf-google-drive.js
Last active December 15, 2023 04:55
Cách tải file PDF trên Google Drive khi bị chặn tải xuống
let jspdf = document.createElement("script");
jspdf.onload = function () {
let pdf = new jsPDF();
let elements = document.getElementsByTagName("img");
for (let i in elements) {
let img = elements[i];
if (!/^blob:/.test(img.src)) {
continue;
@daithinh
daithinh / Cách xóa toàn bộ hình ảnh, video trong Google Photos nhanh chóng.js
Last active December 26, 2022 15:49
Hướng dẫn cách xóa toàn bộ hình ảnh, video trong Google Photos tự động nhanh chóng https://gdrive.vip/cach-xoa-toan-bo-hinh-anh-video-trong-google-photos-nhanh-chong/
// Bạn muốn xóa bao nhiêu ảnh, video?
// Mặc định xóa tất cả
// Sửa ALL_PHOTOS thành số lượng muốn xóa, hoặc để nguyên để xóa tất cả
const maxImageCount = "ALL_PHOTOS";
// Nhấn nút chọn hình ảnh, video và xóa
const ELEMENT_SELECTORS = {
checkboxClass: '.ckGgle',
deleteButton: 'button[aria-label="Xoá"]',
languageAgnosticDeleteButton: 'div[data-delete-origin] > button',
deleteButton: 'button[aria-label="Xoá"]',
@daithinh
daithinh / Liệt kê danh sách file trong folder Google Drive vào Google Sheets - GDrive.VIP.js
Last active June 11, 2023 16:09
Hướng dẫn cách liệt kê danh sách file trong folder Google Drive vào Google Sheets- List all files in a folder Google Drive by GDrive.VIP
// Hướng dẫn liệt kê danh sách file trong folder Google Drive - GDrive.VIP
// GDRIVE.VIP: Dán ID folder vào dưới
var folderId = 'ID Folder';
// Function 1: Liệt kê tất cả folder và viết vào sheet.
function listFolers(){
getFolderTree(folderId, false);
};
@daithinh
daithinh / chuyen-du-lieu-giua-2-tai-khoan-google-drive-gdrive-vip.js
Created December 11, 2018 04:18
Cách chuyển Google Drive sang tài khoản khác. Hướng dẫn chuyển dữ liệu tài khoản Google Drive mới nhất 2019 - GDrive.VIP
function duplicate() {
var sourceFolder = "DATA"; //Thư mục được chia sẻ - GDrive.VIP
var targetFolder = "My_Backup"; //Tên thư mục mới sẽ tạo và lưu trữ dữ liệu của bạn
var source = DriveApp.getFoldersByName(sourceFolder);
var target = DriveApp.createFolder(targetFolder);
if (source.hasNext()) {
copyFolder(source.next(), target);
}
@daithinh
daithinh / kenh76_breadcrumbs
Last active December 26, 2022 15:48
Tạo Breadcrumbs cho Wordpress không cần Plugin
/*
* WordPress Breadcrumbs
* author: Dimox - Edit Kenh76.vn
* version: 2017.25.02
* license: MIT
*/
function kenh76_breadcrumbs() {
/* === OPTIONS === */
$text['home'] = 'Trang chủ'; // text for the 'Home' link
$text['category'] = 'Bài của chuyên mục %s'; // text for a category page