Титан / All tables sortable

// ==UserScript==
// @name         All tables sortable
// @namespace	 https://greasyfork.org/ru/users/303426
// @version      1.0
// @description  Make all tables on any page sortable by converting them to dataTables
// @author       Титан
// @match        *://*/*
// @icon         data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiIgZmlsbD0iI2ZmZiIgY2xhc3M9ImJpIGJpLXRhYmxlIiB2aWV3Qm94PSIwIDAgMTYgMTYiPgogIDxwYXRoIGQ9Ik0wIDJhMiAyIDAgMCAxIDItMmgxMmEyIDIgMCAwIDEgMiAydjEyYTIgMiAwIDAgMS0yIDJIMmEyIDIgMCAwIDEtMi0yVjJ6bTE1IDJoLTR2M2g0VjR6bTAgNGgtNHYzaDRWOHptMCA0aC00djNoM2ExIDEgMCAwIDAgMS0xdi0yem0tNSAzdi0zSDZ2M2g0em0tNSAwdi0zSDF2MmExIDEgMCAwIDAgMSAxaDN6bS00LTRoNFY4SDF2M3ptMC00aDRWNEgxdjN6bTUtM3YzaDRWNEg2em00IDRINnYzaDRWOHoiLz4KPC9zdmc+
// @require https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js
// @grant        none
// @require https://cdn.datatables.net/1.13.6/js/jquery.dataTables.min.js
// @license MIT
// ==/UserScript==

(function() {
	'use strict';

	$(document).ready(function() {
		window.alert = (function() {  // suppress DataTables alert
			var nativeAlert = window.alert;
			return function(message) {
				//window.alert = nativeAlert;
				message.indexOf("DataTables warning") === 0 ?
					console.warn(message) :
					nativeAlert(message);
			}
		})();

		// add dataTAbles css
		$('head').append('<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/1.13.6/css/jquery.dataTables.min.css">');

		try {
			$('table').DataTable({
				"paging": false,
			});
		} catch (e) {
			console.log("All tables sortable error: " + e);
		}

	// Data tables.js
	});
})();