Raw Source
utsavmadaan823 / Google Collections move all favorite photos

// ==UserScript==
// @name         Google Collections move all favorite photos 
// @version      1.0
// @description  Will ask to move all favorite photos to some other collections
// @author       utsavmadaan823
// @include      *
// @grant        none
// @license      MIT
// @run-at context-menu

// @downloadURL  https://openuserjs.org/install/utsavmadaan823/Google_collections_move_all_favorite_photos.user.js
// @updateURL    https://openuserjs.org/install/utsavmadaan823/Google_collections_move_all_favorite_photos.user.js

// ==/UserScript==

(function() {
    'use strict';
    document.querySelector("button.P62QJc").click();
    
    var elements = document.querySelectorAll("div[role='checkbox']");
	for (var i = 0; i < elements.length; i++) {
        elements[i].click();
	}
	
	document.querySelector("button[jsname='ZFNbOb']").click();

})();