Полезная информация

Список ответов на каверзные вопросы можно получить в FAQ-разделе форума.

№1597609-11-2021 18:51:25

voqabuhe
Участник
 
Группа: Members
Зарегистрирован: 06-12-2011
Сообщений: 3231
UA: Firefox 94.0

Re: Custom Buttons

ВВП пишет

Так нажми на кнопки и сравни.

Дык я её не устанавливал, для этого и спросил, чтоб решить, нужна она мне, или ограничится кнопкой memoryMinimizationButton.uc.js, которая как раз работает идентично кнопке на about:memory.

Отсутствует

 

№1597709-11-2021 20:58:02

ВВП
Участник
 
Группа: Members
Зарегистрирован: 13-03-2021
Сообщений: 333
UA: Firefox 94.0

Re: Custom Buttons

voqabuhe

voqabuhe пишет

memoryMinimizationButton.uc.js

Эта шняга 18года вообще не подходить к 94. Даже не парься.

Отсутствует

 

№1597809-11-2021 21:16:56

voqabuhe
Участник
 
Группа: Members
Зарегистрирован: 06-12-2011
Сообщений: 3231
UA: Firefox 94.0

Re: Custom Buttons

ВВП пишет

Эта шняга 18года вообще не подходить к 94. Даже не парься.

Дык её же в своё время Dumby правил и она у меня, как уже сказал, вполне работает.

memoryMinimizationButton.uc.js

Выделить код

Код:

// ==UserScript==
// https://github.com/alice0775/userChrome.js/blob/master/71/memoryMinimizationButton.uc.js
// @name           memoryMinimizationButton.uc.js
// @namespace      http://space.geocities.yahoo.co.jp/gl/alice0775
// @description    memory minimization button
// @charset        utf-8
// @include        main
// @compatibility  Firefox 60
// @author         Alice0775
// @version        2018/10/09 00:00 fix CSS
// @version        2018/09/07 23:00 fix initial visual status
// ==/UserScript==
var memoryMinimizationButton = {
  get memoryMinimizationButton(){
    return document.getElementById("memoryMinimizationButton");
  },

  get statusinfo() {
    if ("StatusPanel" in window) {
      // fx61+
      return StatusPanel._labelElement.value;
    } else {
      return XULBrowserWindow.statusTextField.label;
    }
  },

  set statusinfo(val) {
    if ("StatusPanel" in window) {
      // fx61+
      StatusPanel._label = val;
    } else {
      XULBrowserWindow.statusTextField.label = val;
    }
    if(this._statusinfotimer)
      clearTimeout(this._statusinfotimer);
    this._statusinfotimer = setTimeout(() => {this.hideStatusInfo();}, 2000);
    this._laststatusinfo = val;
    return val;
  },

  init: function() {
    let style = `
      #memoryMinimizationButton {
          width: 16px;
          height: 16px;
        list-style-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAYdEVYdFNvZnR3YXJlAHBhaW50Lm5ldCA0LjEuMWMqnEsAAAFdSURBVFhH7VbLbsMwDMsef5dc8z/53F13GXZYm5kaZciqnKro2hxaAkRkmkqI2gI6KNZ1vStPEJluyS6WZVlB3xDpWc3q/Ewf6ASClwicLkhojc5PxaDvgQIU4dWSPjEa/Z1y1ed5fqPUeCmJVhAGUC9YNzz4ghNEelYDrI5aAozjeNyD5QBqgF34DJAN8GN4oGb3cJ527fftumEqgAVurdk7Um680zR92bXWEdMBWB+s14+TegFf93hpgF5dgylK/cFSPSGvOgKA9afWgP4y+lR/xKuOwMN6AdwFXff4H0eAqfhWnU9Mhdx+rrtMBSjER3TUtLYaqOMYjaldN8wGuBmfAWqAcmMPe1ACYF6lIBUZXXFO29I3/5IVoFMpcLoA2iX96gVLiBb0bb6gINSy/WLsgb4HDgBD0BzqXsv0i8nDm+/JCC8lKW5zY4SGvT9LBdbVS0g/64q4fxh+AZvdJHHKcZdFAAAAAElFTkSuQmCC');
      }
      @media (min-resolution: 1.1dppx) {
        #memoryMinimizationButton {
          width: 32px;
          height: 32px;
        }
      }
     `.replace(/\s+/g, " ");

    let sss = Components.classes['@mozilla.org/content/style-sheet-service;1']
                .getService(Components.interfaces.nsIStyleSheetService);
    let newURIParam = {
        aURL: 'data:text/css,' + encodeURIComponent(style),
        aOriginCharset: null,
        aBaseURI: null
    }
    let cssUri = Services.io.newURI(newURIParam.aURL, newURIParam.aOriginCharset, newURIParam.aBaseURI);
    sss.loadAndRegisterSheet(cssUri, sss.AUTHOR_SHEET);

    if (this.memoryMinimizationButton)
      return;

    Components.utils.import("resource:///modules/CustomizableUI.jsm");
    try {
      CustomizableUI.createWidget({ //must run createWidget before windowListener.register because the register function needs the button added first
        id: 'memoryMinimizationButton',
        type:  'custom',
        defaultArea: CustomizableUI.AREA_NAVBAR,
        onBuild: function(aDocument) {
          var toolbaritem = aDocument.createElementNS('http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul', 'toolbarbutton');
          var props = {
            id: "memoryMinimizationButton",
            class: "toolbarbutton-1 chromeclass-toolbar-additional",
            tooltiptext: "Memory minimization",
            oncommand: "memoryMinimizationButton.doMinimize(event);",
            type: CustomizableUI.TYPE_TOOLBAR,
            label: "Memory minimization",
            removable: "true"
          };
          for (var p in props) {
            toolbaritem.setAttribute(p, props[p]);
          }
          
          return toolbaritem;
        },
      });
    } catch(ee) {}
  },

  doMinimize: function(event) {
    function doGlobalGC()  {
       Services.obs.notifyObservers(null, "child-gc-request");
       Cu.forceGC();
    }

    function doCC()  {
      Services.obs.notifyObservers(null, "child-cc-request");
      if (typeof window.windowUtils != "undefined")
        window.windowUtils.cycleCollect();
      else
      window.QueryInterface(Components.interfaces.nsIInterfaceRequestor)
            .getInterface(Components.interfaces.nsIDOMWindowUtils).cycleCollect();
    }

    function doMemMinimize() {
      Services.obs.notifyObservers(null, "child-mmu-request");
      var gMgr = Cc["@mozilla.org/memory-reporter-manager;1"]
             .getService(Ci.nsIMemoryReporterManager);
      gMgr.minimizeMemoryUsage(() => memoryMinimizationButton.displayStatus("Memory minimization done"));
    }
    function sendHeapMinNotifications()  {
      function runSoon(f) {
        var tm = Cc["@mozilla.org/thread-manager;1"]
                  .getService(Ci.nsIThreadManager);

        tm.mainThread.dispatch({ run: f }, Ci.nsIThread.DISPATCH_NORMAL);
      }

      function sendHeapMinNotificationsInner() {
        var os = Cc["@mozilla.org/observer-service;1"]
                 .getService(Ci.nsIObserverService);
        os.notifyObservers(null, "memory-pressure", "heap-minimize");

        if (++j < 3)
          runSoon(sendHeapMinNotificationsInner);
      }

      var j = 0;
      sendHeapMinNotificationsInner();
    }

    this.displayStatus("Memory minimization start")
    doGlobalGC();
    doCC();
    //sendHeapMinNotifications();
    setTimeout(()=> {doMemMinimize();}, 1000);
  },
  
  _statusinfotimer: null,
  _laststatusinfo: null,
  displayStatus: function(val) {
    this.statusinfo = val;
  },
  hideStatusInfo: function() {
    if(this._statusinfotimer)
      clearTimeout(this._statusinfotimer);
    this._statusinfotimer = null;
    if (this._laststatusinfo == this.statusinfo)
      this.statusinfo = "";
  }

}

  memoryMinimizationButton.init();


ПС Но ты так и не ответил на мой вопрос №16042?

Отредактировано voqabuhe (09-11-2021 21:19:02)

Отсутствует

 

№1597909-11-2021 21:40:24

ВВП
Участник
 
Группа: Members
Зарегистрирован: 13-03-2021
Сообщений: 333
UA: Firefox 93.0

Re: Custom Buttons

voqabuhe
Отвечаю. Поставь оба скрипта , сам все и увидишь.

Отсутствует

 

№1598009-11-2021 21:52:55

voqabuhe
Участник
 
Группа: Members
Зарегистрирован: 06-12-2011
Сообщений: 3231
UA: Firefox 94.0

Re: Custom Buttons

ВВП
Ну ты же поставил, что трудно ответить? Форум же для того и существует, чтоб самому не всё пробовать.

Отсутствует

 

№1598109-11-2021 22:04:39

ВВП
Участник
 
Группа: Members
Зарегистрирован: 13-03-2021
Сообщений: 333
UA: Firefox 94.0

Re: Custom Buttons

voqabuhe
Мало ли что и кто напишет. Хочешь сделать хорошо - сделай сам. Тем более, уже сказал ,что

voqabuhe пишет

memoryMinimizationButton.uc.js

-  не того и индикатора нет и чистит так себе...

Отсутствует

 

№1598209-11-2021 22:27:12

voqabuhe
Участник
 
Группа: Members
Зарегистрирован: 06-12-2011
Сообщений: 3231
UA: Firefox 94.0

Re: Custom Buttons

ВВП пишет

не того и индикатора нет и чистит так себе...

Дык сказал же, чистит абсолютно идентично about:memory. А "индикатор" есть отдельно №16013. Зато без дополнительных приблуд.

Отсутствует

 

№1598310-11-2021 00:09:38

ВВП
Участник
 
Группа: Members
Зарегистрирован: 13-03-2021
Сообщений: 333
UA: Firefox 93.0

Re: Custom Buttons

Dumby
Не могу вставить var args = [link,"/add"];   В кн. видео . Чтобы в плейлист ,а не сходу плей.

скрытый текст

Выделить код

Код:

(func => {
	var sysPlayerName = "Pot Player";
	var path = "D:\\PotPlayer\\PotPlayerMini64.exe";
	var videoMoved = "Видео перенесено в " + sysPlayerName;
	var noFound = "Не найдено видео на странице, доступное для переноса в " + sysPlayerName;

	
	this.label = "Открыть видео в " + sysPlayerName;
	this.tooltipText = "Л: Видео в плеер\nП: Видео из Clipboard";

	this._handleClick = () => {
		var msgName = _id + ":Player";
		var listener = ({data}) => data ? run([data]) : notify();
                var listener = ({data}) => data ? run([data], true) : notify();
		messageManager.addMessageListener(msgName, listener);
		addDestructor(() => messageManager.removeMessageListener(msgName, listener));

		var url = "data:charset=utf-8," + encodeURIComponent(
			`(${func})()`.replace("MSG_NAME", msgName)
				.replace("VIDEO_MOVED", encodeURIComponent(videoMoved))
				.replace("CONFIRM", encodeURIComponent("Открыть ссылку в плеере ?"))
		);
		(this._handleClick = () => gBrowser.selectedBrowser.messageManager.loadFrameScript(url, false))();
                
	}
	this.onclick = e => e.button != 1 || gShowPopup(this); 
	this.oncontextmenu = e => {
		if (e.ctrlKey || e.shiftKey || e.altKey) return;
		e.preventDefault();
		custombuttons.confirmBox(null, "Запустить плеер из буфера обмена ?", "Да", "Нет")
                        && run([gClipboard.read(),]);
                      
			
	}
	var popup = document.getElementById("contentAreaContextMenu");
	addEventListener("popupshowing", {
		get hidden() {
			return !(gContextMenu.onLink || gContextMenu.onVideo || gContextMenu.onPlainTextLink);
		},
		handleEvent() {
			if (this.hidden) return;
			var menuitem = document.createXULElement("menuitem");
			for(var args of Object.entries({
				image: self.image,
				oncommand: "play()",
				class: "menuitem-iconic",
				label: "Открыть в " + sysPlayerName
			}))
				menuitem.setAttribute(...args);
			menuitem.play = () => play(gContextMenu.linkURL || gContextMenu.mediaURL);
			document.getElementById("context-savelink").before(menuitem);
			addDestructor(() => menuitem.remove());
			this.handleEvent = e => {
				if (e.target == popup) menuitem.hidden = this.hidden;
			}
		}
	}, false, popup || 1);

	var play = link => custombuttons.confirmBox(null, "Открыть ссылку в плеере ?", "Да", "Отмена") && run([link]);
	/*
	var run = args => {
		var file = FileUtils.File(path);
		(run = args => {
			if (!file.exists()) return custombuttons.alertBox("File not exists!", path);
			var process = Cc["@mozilla.org/process/util;1"].createInstance(Ci.nsIProcess);
			process.init(file);
			process.runwAsync(args, args.length);
		})(args);
	}
*/
	var run = (...a) => {
		var file = FileUtils.File(path);
		(run = (args, quit) => {
			if (!file.exists()) return custombuttons.alertBox("File not exists!", path);
			var process = Cc["@mozilla.org/process/util;1"].createInstance(Ci.nsIProcess);
			process.init(file);
			process.runwAsync(args, args.length);
			quit && window.close();
		})(...a);
	}
	var notify = () => {
		var name = _id + "-noFound";
		var as = Cc["@mozilla.org/alerts-service;1"].getService(Ci.nsIAlertsService);
		(notify = () => setTimeout(as.closeAlert, 1150, name, as.showAlertNotification(
			"chrome://global/skin/icons/question-48.png", "", noFound, false, "", null, name
		)))();
	}

})(() => {

	var found, videoMoved, SEND = msg => {
		found = true;
		if (!msg || Cc["@mozilla.org/embedcomp/prompt-service;1"]
			.getService(Ci.nsIPromptService)
			.confirm(content, null, decodeURIComponent("CONFIRM"))
		) {
			if (msg) videoMoved = decodeURIComponent("VIDEO_MOVED");
			sendAsyncMessage("MSG_NAME", msg);
		}
		else return true;
	}

	var YoutubeID = /(?:youtube(?:-nocookie)?\.com\/(?:[^\/\n\s]+\/\S+\/|(?:v|e(?:mbed)?)\/|\S*?[?&]v=)|youtu\.be\/)([a-zA-Z0-9_-]{11})(?:\W|$)/;

	var tmp = '',
	tmpp = '',
	innerA = '<div style="display:block!important;color:#00ff00!important;width:250px!important;font:bold 16px serif!important;z-index:999!important;opacity:1!important;visibility: visible!important;',
	innerB = 'left:5px!important;position:absolute!important;height:auto!important;box-sizing:border-box!important;padding:5px!important;margin:5px!important;',
	//stopPl = "javascript:(function(){v=document.getElementById('movie_player');if(v){v.stopVideo()}else{v=document.getElementsByTagName('video');if(v){v[0].src='';try{v[0].load()}catch(e){}};}})();",
	ytIMGouter = function (ytID) {
		return '<div width="100%"><br /><a target="_blank" href="https://www.youtube.com/watch?v=' + ytID + '"><img src="https://i.ytimg.com/vi/' + ytID + '/hqdefault.jpg"></a><br />' + innerA + 'background-color:black!important;position:relative!important;bottom:20px!important;">&nbsp;&nbsp;' + videoMoved + '</div><br /></div><br />'
	},
	handlWin = function (currentWin) {
		tmp = '';
		var elem = currentWin.document.getElementsByTagName('video'),
		currLoc = currentWin.location;
		if (elem.length > 0) {
			if (currLoc.hostname.indexOf('youtu') != -1 && (tmp = currLoc.toString().match(YoutubeID)) && tmp[1].length == 11) {

				if (SEND('https://www.youtube.com/watch?v=' + tmp[1])) return;

				videoMovedbox = currentWin.document.createElement('videoMoved');
				videoMovedbox.innerHTML = innerA + innerB + 'top:-15px!important;"><b>' + videoMoved + '</b></div>';

				//loadURI(stopPl);
				(function(d){var v=d.getElementById('movie_player');if(v){try{v.stopVideo()}catch{}}
					else{v=d.getElementsByTagName('video');if(v[0]){v[0].src='';try{v[0].load()}catch{}};}})(currentWin.document);

				currentWin.document.getElementById('eow-title').appendChild(videoMovedbox);
				return true;
			};
			for (i = 0; i < elem.length; i++) {
				if (((tmp = getSrc(elem[i].parentNode, currLoc)) && tmp.length > 2) || (i == 0 && currentWin.document.body.innerHTML.substring(0, 7) == '<video ' && (tmp = currLoc.toString()))) {

					if (SEND(tmp)) return;

					videoMovedbox = currentWin.document.createElement('videoMoved');
					videoMovedbox.innerHTML = innerA + innerB + 'top:20px!important;background-color:black!important;">' + videoMoved + '</div>';

					if (currLoc.hostname == 'www.youtube.com') {
						elem[i].parentNode.parentNode.appendChild(videoMovedbox);
					} else {
						elem[i].parentNode.appendChild(videoMovedbox);
					};
					elem[i].src = '';
					try {
						elem[i].load()
					} catch (e) {};
					return true;
				}
			}
		};

		currentWin._elems = currentWin.document.getElementsByTagName('iframe');
		if (currentWin._elems.length > 0) {
			for (currentWin._iCounter = 0; currentWin._iCounter < currentWin._elems.length; currentWin._iCounter++) {
				if ((currentWin._elems[currentWin._iCounter].src.indexOf('youtube.com') > -1) && (tmp = currentWin._elems[currentWin._iCounter].src.match(YoutubeID)) && (tmp[1].length == 11)) {

				if (SEND('https://www.youtube.com/watch?v=' + tmp[1])) return;

				currentWin._elems[currentWin._iCounter].outerHTML = ytIMGouter(tmp[1]);
					return true;
				};
				if (currentWin._elems[currentWin._iCounter].clientWidth > 80 && currentWin._elems[currentWin._iCounter].clientHeight > 40 && handlWin(currentWin._elems[currentWin._iCounter].contentWindow))
					return true;
			}
		};

		elem = currentWin.document.getElementsByTagName('object');
		currLoc = currentWin.location;
		if (elem.length == 0) {
			elem = currentWin.document.getElementsByTagName('embed')
		};
		if (elem.length > 0) {
			for (i = 0; i < elem.length; i++) {
				if (elem[i].innerHTML.indexOf('youtu') != -1 && (tmp = elem[i].innerHTML.match(YoutubeID)) && tmp[1].length == 11) {

					if (SEND('https://www.youtube.com/watch?v=' + tmp[1])) return;

					elem[i].outerHTML = ytIMGouter(tmp[1]);
					return true;
				} else {
					if (elem[i].clientWidth > 80 && elem[i].clientHeight > 40) {
						if (((tmp = getSrc(elem[i].parentNode, currLoc)) || (tmp = getLink(elem[i], currLoc))) && tmp.length > 2) {

							if (SEND(tmp)) return;

							elem[i].outerHTML = innerA + 'background-color:black!important;bottom:20px!important;">&nbsp;&nbsp;' + videoMoved + '</div>';
							return true;
						};
					};
				}
			};
		};
		return false;
	};

	function restProtHost(lnkR, curLoc) {
		if (lnkR.length == 0)
			return '';
		let tr = lnkR.replace(/^:\/\//, curLoc.protocol + "//");
		if (!tr.match(/^https?:\/\//i)) {
			lnkR = tr.replace(/^\/+/, '');
			if (lnkR.split('/')[0].split('?')[0].split('#')[0].toLowerCase().match(/^(?:[-a-z\d]+\.)+[a-z\d]{2,6}$/)) {
				tr = curLoc.protocol + '//' + lnkR;
			} else {
				tr = curLoc.protocol + '//' + curLoc.host + "/" + lnkR;
			}
		};
		return tr;
	};

	function getSrc(vobj, currentLoc) {
		var t = '',
		tt = '';
		if ((((t = vobj.innerHTML.match(/<video.*?\ssrc=(?:(?:'([^']*)')|(?:"([^"]*)")|([^\s]*))/i)) && (t) && (tt = t[1] || t[2] || t[3]) && tt.indexOf('blob:') == -1) || ((t = vobj.innerHTML.match(/<source.*?\ssrc=(?:(?:'([^']*)')|(?:"([^"]*)")|([^\s]*)).*?\stype=['"]?video\//i)) && (t) && (tt = t[1] || t[2] || t[3]))) && tt.length > 2 && tt.indexOf('blob:') == -1) {
			if (tt.indexOf(".mp4/?") == -1) {
				tt = tt.replace(/&amp;/g, "&")
			};
			t = restProtHost(tt, currentLoc);
			return t;
		};
		return '';
	};

	function getLink(obj, curLocation) {

		if (!obj || !obj.tagName)
			return '';
		q = obj.tagName.toLowerCase();

		var getParam = function (e, n) {
			var v = '',
			r = new RegExp('^(' + n + ')$', 'i'),
			param = e.getElementsByTagName('param');
			for (var igp = 0, p; p = param[igp]; igp++) {
				if (p.hasAttribute('name') && p.getAttribute('name').match(r)) {
					v = p.getAttribute('value');
					break
				};
			};
			return v;
		};

		var restPath = function (f, s) {
			return (f.substring(0, 4) == 'http') ? f : s.replace(/[#?].*$/, '').replace(/[^\/]*$/, f)
		};

		function videoLinkExtract(fl) {
			alert(fl);
			var linkArr = [],
			outLinks = [],
			jj = 0,
			lba = '',
			lbb = '',
			decodeURL = gBrowser.currentURI.spec; {
				try {
					return decodeURIComponent(s)
				} catch (e) {
					return unescape(s)
				}
			};

			for (var ij = 0; ij < 3; ij++) {
				lba = lba + String.fromCharCode(parseInt((Math.random() * 15 + 1) + '', 10));
				lbb = lbb + String.fromCharCode(parseInt((Math.random() * 15 + 16) + '', 10));
			};

			function pushWithMerit(lnk) {

				var merit = -11;
				if (lnk.match(/^https?:\/\//i))
					merit = merit + 40;
				if (outLinks.length == 0)
					merit = merit + 1;
				if (lnk.match(/^\//))
					merit = merit + 7;
				if (lnk.match(/^\/\//))
					merit = merit + 30;
				if (lnk.match(/240p([^a-z]|$)/i))
					merit = merit + 1;
				if (lnk.match(/[^a-z]240([^a-z0-9]|$)/i))
					merit = merit + 1;
				if (lnk.match(/360p([^a-z]|$)/i))
					merit = merit + 3;
				if (lnk.match(/[^a-z]360([^a-z0-9]|$)/i))
					merit = merit + 3;
				if (lnk.match(/480p([^a-z]|$)/i))
					merit = merit + 5;
				if (lnk.match(/[^a-z]480([^a-z0-9]|$)/i))
					merit = merit + 5;
				if (lnk.match(/720p([^a-z]|$)/i))
					merit = merit + 7;
				if (lnk.match(/[^a-z]720([^a-z0-9]|$)/i))
					merit = merit + 7;
				if (lnk.match(/\.mp4([^a-z]|$)/i))
					merit = merit + 8;
				if (lnk.match(/_hd([^a-z]|$)/i))
					merit = merit + 6;
				if (lnk.match(/\.(jpg|xml)([^a-z]|$)/i))
					merit = merit - 40;
				if (merit > 0)
					outLinks.push(merit + lba + lnk);
				Services.console.logStringMessage('merit:' + merit + ' lnk->' + lnk);
			};

			linkArr.push(fl);
			while (linkArr.length > jj && jj < 30) {

				var testPaths = [];
				testPaths = linkArr[jj].split(/(\.(?:flv|mp4|m3u8))/i);
				if (testPaths[testPaths.length - 1] == '')
					testPaths.pop();

				for (k = 1; k < testPaths.length; k = k + 2) {

					if (testPaths[k - 1].indexOf(lba) > -1) {
						pref = testPaths[k - 1];
					} else {
						var testAboutDom = testPaths[k - 1].toLowerCase().split(/(https?:\/\/)/);
						if (testAboutDom[testAboutDom.length - 1] == '')
							testAboutDom.pop();
						var pTest = testAboutDom[testAboutDom.length - 1].split(/(\?[^\?]*?&)/);
						if (pTest.length > 2) {
							pTest.pop();
							pTest.pop();
						};
						testAboutDom[testAboutDom.length - 1] = pTest.join('');
						pref = testPaths[k - 1].substring(testAboutDom.join('').lastIndexOf("&") + 1);
					};

					t2 = pref.lastIndexOf(lbb);
					if (t2 > -1) {
						pref = pref.substring(t2 + 3);
					} else {

						t2 = pref.lastIndexOf('{"');
						if (t2 > -1)
							pref = pref.substring(t2 + 2);
						t2 = pref.lastIndexOf('["');
						if (t2 > -1)
							pref = pref.substring(t2 + 2);
						t2 = pref.lastIndexOf(',"');
						if (t2 > -1)
							pref = pref.substring(t2 + 2);
						t2 = pref.toLowerCase().lastIndexOf('"http://');
						if (t2 > -1)
							pref = pref.substring(t2 + 1);
						t2 = pref.toLowerCase().lastIndexOf('"https://');
						if (t2 > -1)
							pref = pref.substring(t2 + 1);
						t2 = pref.toLowerCase().lastIndexOf(',http://');
						if (t2 > -1)
							pref = pref.substring(t2 + 1);
						t2 = pref.toLowerCase().lastIndexOf(',https://');
						if (t2 > -1)
							pref = pref.substring(t2 + 1);
						t2 = pref.toLowerCase().lastIndexOf(';http');
						if (t2 > -1)
							pref = pref.substring(t2 + 1);
						t2 = pref.toLowerCase().lastIndexOf('*https://');
						if (t2 > -1)
							pref = pref.substring(t2 + 1);
						t2 = pref.toLowerCase().lastIndexOf(' or ');
						if (t2 > -1)
							pref = pref.substring(t2 + 4);

						pref = pref.substring(pref.split('/')[0].toLowerCase().split('%2f')[0].lastIndexOf('=') + 1);

					}

					if (pref.length > 0) {

						if (pref.split('?')[0].toLowerCase().match(/%[2-3][0-9a-f]/)) {

							t2 = pref.indexOf('"')
								if (t2 > -1)
									pref = pref.substring(t2 + 1);
								suff = testPaths[k + 1] ? testPaths[k + 1].split('&')[0].split('"')[0].split(';')[0].split(/,http/i)[0] : '';
							if ((suff != testPaths[k + 1]) || (testPaths.length < k + 3)) {
								if (testPaths.length > k + 1) {
									testPaths[k + 1] = ((pref == testPaths[k - 1]) ? '' : '&') + testPaths[k + 1].substr(suff.length)
								};
								t2 = pref.lastIndexOf(lba);
								if (t2 > -1)
									pref = pref.substring(t2 + 3)
										linkArr.push(decodeURL(pref + testPaths[k] + suff));

							} else {
								testPaths[k + 1] = (pref == testPaths[k - 1] ? '' : lbb) + pref + testPaths[k] + suff
							}
						} else {
							suff = testPaths[k + 1] ? testPaths[k + 1].split(';')[0].split('"]')[0].split('"}')[0].split('",')[0].split(/,https?:\/\//i)[0].split('*https://')[0].split(' or ')[0] : '';
							t2 = suff.indexOf('&');
							if ((t2 > -1) && (pref != testPaths[k - 1])) {
								if (t2 == 0)
									suff = '';
								if (suff.charAt(0) != '?')
									suff = suff.split(/(&[^&]+=https?:\/\/)/i)[0];
							};
							if ((suff != testPaths[k + 1]) || (testPaths.length < k + 3)) {
								if (testPaths.length > k + 1) {
									testPaths[k + 1] = ((pref == testPaths[k - 1]) ? '' : '&') + testPaths[k + 1].substr(suff.length)
								};
								t2 = pref.lastIndexOf(lba);
								if (t2 > -1)
									pref = pref.substring(t2 + 3);
								pushWithMerit(pref + testPaths[k] + suff);

							} else {
								testPaths[k + 1] = lba + (pref == testPaths[k - 1] ? '' : lbb) + pref + testPaths[k] + suff
							}
						}
					}
				};
				jj = jj + 1;
			};

			if (outLinks.length == 0)
				return '';
			function srt(a, b) {
				a = parseInt(a.substr(0, a.indexOf(lba)), 10);
				b = parseInt(b.substr(0, b.indexOf(lba)), 10);
				if (a < b)
					return 1;
				if (a > b)
					return -1;
				return 0
			};
			outLinks.sort(srt);
			outLinks[0] = outLinks[0].substr(outLinks[0].indexOf(lba) + 3)
				if (outLinks[0].indexOf('_hq.mp4/?time=') > 0)
					outLinks[0] = outLinks[0].replace(/&/g, '&amp;');
				return outLinks[0];
		};

		if (!ol)
			return '';
		//ol = ol.replace(/^:?\/\//, curLocation.protocol + "//");
		//return restPath(ol, src);
		return restProtHost(ol, curLocation);
	};

	try {handlWin(content);} finally {found || SEND();}
});

 var style = custombutton.buttonGetHelp(self).replace(/id/g, _id);
var uri = makeURI('data:text/css,'+ encodeURIComponent(style));
var sss = Cc["@mozilla.org/content/style-sheet-service;1"].getService(Ci.nsIStyleSheetService);
sss.loadAndRegisterSheet(uri, 0);

Отредактировано ВВП (10-11-2021 00:10:13)

Отсутствует

 

№1598410-11-2021 01:08:02

xrun1
Участник
 
Группа: Members
Зарегистрирован: 12-12-2013
Сообщений: 1205
UA: Firefox 94.0

Re: Custom Buttons

А у меня такой индикатор памяти, и чистит нормально. Как бы цвет поменять на зелёный и цвет при наведении мышки на красный.

memory_used_in_urlbar.js

Выделить код

Код:

// https://forum.mozilla-russia.org/viewtopic.php?pid=789048#p789048
// https://forum.mozilla-russia.org/viewtopic.php?pid=789076#p789076
// https://forum.mozilla-russia.org/viewtopic.php?pid=791818#p791818
// https://forum.mozilla-russia.org/viewtopic.php?pid=795879#p795879
(async id => ({

	delay: 2e3,

	val: "",
	init(topic, mm) {
		Services.obs.addObserver(mm = this, topic);
		Services.obs.addObserver(function quit(s, t) {
			this.timer?.cancel();
			Services.obs.removeObserver(mm, topic);
			Services.obs.removeObserver(quit, t);
		}, "quit-application-granted");
	},
	observe(win) {
		var df = win.MozXULElement.parseXULToFragment(
/*
			`<hbox id="${id}"><label id="${id += "-label"}"/></hbox>`
*/
			`<hbox id="${id}" tooltiptext="${
				"ЛКМ: Минимизировать потребление памяти&#xA;ПКМ: about:performance&#xA;Ctrl+ПКМ: about:debugging#/runtime/this-firefox"
			}" onclick="event.button || ${
				"memoryMinimizationButton.doMinimize()"
			}"><label id="${id += "-label"}"/></hbox>`
		);
		this.timer = Cc["@mozilla.org/timer;1"].createInstance(Ci.nsITimer);
		(this.observe = async win => {
			this.timer.cancel();
			await new Promise(ChromeUtils.idleDispatch);
/*
			win.document.getElementById("star-button-box")
				.after(win.document.importNode(df, true));
			this.notify();
		})(win);
	},
*/
			var clone = win.document.importNode(df, true);
			clone.firstChild.oncontextmenu = this.about;
			win.document.getElementById("star-button-box").after(clone);
			this.notify();
		})(win);
	},
	about(e) {
		var gb = e.view.gBrowser;
		gb.selectedTab = gb.addTrustedTab(`about:${
			e.ctrlKey ? "debugging#/runtime/this-firefox" : "performance"
		}`);
	},
	async notify() {
		var info = await ChromeUtils.requestProcInfo();
		var bytes = info.memory;
		for(var child of info.children) bytes += child.memory;
		this.timer.initWithCallback(this, this.delay, this.timer.TYPE_ONE_SHOT);

		var prev = this.val;
		if ((this.val = this.mgb(bytes)) != prev)
			for(var win of CustomizableUI.windows) {
				var lab = win.document.getElementById(id);
				if (lab) lab.value = this.val;
			}
	},
	mgb: bytes => bytes < 1073741824
		? Math.round(bytes / 1048576) + "MB"
		: (bytes / 1073741824).toFixed(2) + "GB"
}).init("browser-delayed-startup-finished"))("ucf-mem-indicator");

Отсутствует

 

№1598510-11-2021 02:08:20

Dobrov
Участник
 
Группа: Members
Зарегистрирован: 04-10-2011
Сообщений: 469
UA: Firefox 87.0

Re: Custom Buttons

Dumby подскажи, как из js-кода перейти в режим «Адаптивный дизайн» ?
В меню нашёл только идентификатор горячей клавиши key_responsive_DesignMode


xrun1 в твоём скрипте тоже недостаток - не показывает цифры без такого дополнения:

Выделить код

Код:

// Bug 1665318 - In about:processes refresh, ResidentUniqueDistinguishedAmount is slow (Firefox 94+)
		// https://bugzilla.mozilla.org/show_bug.cgi?id=1665318
		parseInt(Services.appinfo.platformVersion) < 94 && Object.assign(this, eval(
			`({${this.notify}})`.replace("memory", "residentSetSize").replace("memory", "residentUniqueSize")
		));

Отредактировано Dobrov (10-11-2021 02:42:17)

Отсутствует

 

№1598610-11-2021 04:06:33

xrun1
Участник
 
Группа: Members
Зарегистрирован: 12-12-2013
Сообщений: 1205
UA: Firefox 94.0

Re: Custom Buttons

Dobrov
Увидел здесь разговор, вспомнил, что у меня есть в копилке такая кнопка, проверил и на моём [firefox] v94.0.1 работает. А так пользоваться ей не вижу для себя смысла.
Знать количество занятой памяти [firefox] - мне это не надо.
Очистка памяти имела бы для меня смысл, если памяти дофига и отключён файл подкачки pagefile.sys. У меня оперативки 4 гига и хотя в [firefox] отключён дисковый кэш и настроено типа "всё держать в памяти", это не так. Смотрим "Монитор ресурсов" и видим постоянную запись в файл подкачки. И что я очищу? Перезапишу pagefile.sys?

Отсутствует

 

№1598710-11-2021 05:46:16

voqabuhe
Участник
 
Группа: Members
Зарегистрирован: 06-12-2011
Сообщений: 3231
UA: Firefox 94.0

Re: Custom Buttons

xrun1 пишет

memory_used_in_urlbar.js

Во, спасибо, хороший вариант.

проверил и на моём [firefox] v94.0.1 работает.

Аналогично.

Отсутствует

 

№1598810-11-2021 06:33:25

voqabuhe
Участник
 
Группа: Members
Зарегистрирован: 06-12-2011
Сообщений: 3231
UA: Firefox 94.0

Re: Custom Buttons

xrun1
Интересное обнаружил, memory_used_in_urlbar.js чистит только совместно с memoryMinimizationButton.uc.js, что я выше выкладывал. А если memoryMinimizationButton.uc.js отключить, то ЛКМ в memory_used_in_urlbar.js не срабатывает.

Отсутствует

 

№1598910-11-2021 12:17:40

xrun1
Участник
 
Группа: Members
Зарегистрирован: 12-12-2013
Сообщений: 1205
UA: Firefox 94.0

Re: Custom Buttons

voqabuhe
Ага, забавно.:)
ЛКМ по циферкам потребления памяти вызывает функцию doMinimize() из скрипта memoryMinimizationButton.uc.js.

скрытый текст

Выделить код

Код:

onclick="event.button || ${
				"memoryMinimizationButton.doMinimize()"


Как бы цвет поменять обычный/при наведении мышки?

Отредактировано xrun1 (10-11-2021 14:28:20)

Отсутствует

 

№1599010-11-2021 16:20:23

_zt
Участник
 
Группа: Members
Зарегистрирован: 10-11-2014
Сообщений: 1635
UA: Firefox 91.0

Re: Custom Buttons

xrun1

#ucf-mem-indicator-label:hover {
    color: red !important;
}

Отсутствует

 

№1599110-11-2021 18:18:29

voqabuhe
Участник
 
Группа: Members
Зарегистрирован: 06-12-2011
Сообщений: 3231
UA: Firefox 94.0

Re: Custom Buttons

xrun1 пишет

ЛКМ по циферкам потребления памяти вызывает функцию doMinimize() из скрипта memoryMinimizationButton.uc.js.

Ну это я тоже уже инспектором отследил oncommand = memoryMinimizationButton.doMinimize(event); Очевидно в своё время Dumby по чьей-то просьбе объединил  подобным образом эти кнопки. :)

_zt пишет

#ucf-mem-indicator-label:hover {
    color: red !important;
}

А чтоб выделять как обычные кнопки при наведение можно?

Отсутствует

 

№1599210-11-2021 21:19:09

_zt
Участник
 
Группа: Members
Зарегистрирован: 10-11-2014
Сообщений: 1635
UA: Firefox 91.0

Re: Custom Buttons

voqabuhe

по чьей-то просьбе объединил

https://forum.mozilla-russia.org/viewto … 69#p789069
   

voqabuhe пишет

выделять как обычные кнопки при наведение

Оформляйте как хотите.

Выделить код

Код:

#ucf-mem-indicator:hover {
    border: 1px solid цвет !important;
    background: ... !important;
или
    background-color: ... !important;
еще можно
    opacity: от 0 или 0.1 до 1 !important;
}

Отсутствует

 

№1599310-11-2021 22:19:43

voqabuhe
Участник
 
Группа: Members
Зарегистрирован: 06-12-2011
Сообщений: 3231
UA: Firefox 94.0

Re: Custom Buttons

_zt
Спасибо. А размеры выделения как задать и углы скруглить?

Добавлено 10-11-2021 22:28:40

_zt пишет

по чьей-то просьбе объединил

https://forum.mozilla-russia.org/viewto … 69#p789069

Ну вот теперь совсем всё стало ясно, откуда ноги растут. Спасибо. :)

Отредактировано voqabuhe (10-11-2021 22:28:40)

Отсутствует

 

№1599410-11-2021 22:40:36

_zt
Участник
 
Группа: Members
Зарегистрирован: 10-11-2014
Сообщений: 1635
UA: Firefox 91.0

Re: Custom Buttons

voqabuhe
Скруглить - border-radius: 1px !important; значение подберите.
Это не размеры выделения, это размеры контейнера. Соответственно нужно не размер задавать, а поля и отступы.
Как обычно - margin: , padding: если надо то с -top: , -bottom: , -left: , -right: .
И тоже самое для #ucf-mem-indicator-label, если надо выровнять текст внутри контейнера. И еще для label можно все что обычно для текста - width: , text-align: , font-size: , font-style: .
   
И вообще тема не та. :)

Отсутствует

 

№1599510-11-2021 23:09:38

voqabuhe
Участник
 
Группа: Members
Зарегистрирован: 06-12-2011
Сообщений: 3231
UA: Firefox 94.0

Re: Custom Buttons

_zt
Спасибо.

Отсутствует

 

№1599611-11-2021 09:25:08

Dumby
Участник
 
Группа: Members
Зарегистрирован: 12-08-2012
Сообщений: 2214
UA: Firefox 78.0

Re: Custom Buttons

ВВП пишет

Я извиняюсь, нельзя еще в кодом memory поработать ? Task - чуть не ноль показывает на пустой вкладке, а на индикаторе 140-160 мгб , в 93 - 60мгб. Кажись графич.редактор не трогает очистка...Это расхождение в цифрах парит немного...

Объяснял же — нет туда доступа.
Могу попробовать через ctypes c nsMemoryReporterManager.cpp срисовать,
но никакой уверенности, что выйдет правильно, разумеется нет.
И, тогда уж, и в jsm'ке только residentUnique оставить, вроде так ближе к «Task».

скрытый текст

Выделить код

Код:

(async id => ({

	delay: 2e3,

	xul: `
		<hbox
			id="${id}"
			tooltiptext="ЛКМ: Очистить Память"
		>
			<label value="ram" id="${id += "-label"}"/>
		</hbox>
	`,
	css: `
		min-height: 26px !important;
		height: 26px !important;
		border-radius: 3px !important;
		padding: 0px 5px 0px !important;
		color: #00ffff !important;
		font-size: 15px !important;
		margin: 0px  1px  1px 3px !important;

		font-weight: 400 !important;
		font-family: segoe ui !important;

		background: linear-gradient(rgb(72, 85, 108),rgb(20, 25, 34)) !important;
	`,
	launch() {
		var file = Services.dirsvc.get("ProfD", Ci.nsIFile);
		["memory", "start.vbs"].forEach(file.append);
		(this.launch = file.launch)();
	},
	val: "",
	name: "UCFMemIndReporter",
	init(topic, mm) {
		Services.obs.addObserver(mm = this, topic);
		Services.obs.addObserver(function quit(s, t) {
			this.timer?.cancel();
			this.close?.();
			Services.obs.removeObserver(mm, topic);
			Services.obs.removeObserver(quit, t);
		}, "quit-application-granted");
	},
	observe(win) {
		var df = win.MozXULElement.parseXULToFragment(this.xul);
		this.click = e => e.button || this.launch();
		this.timer = Cc["@mozilla.org/timer;1"].createInstance(Ci.nsITimer);
		ChromeUtils.registerProcessActor(this.name, {
			includeParent: true,
			child: {moduleURI: "chrome://user_chrome_files/content/custom_scripts/memreporter.jsm"}
		});
		(this.observe = async win => {
			this.timer.cancel();
			await new Promise(win.requestAnimationFrame);
			var clone = win.document.importNode(df, true);
			var hbox = clone.firstChild;
			win.document.getElementById("page-action-buttons").append(clone);
			hbox.onclick = this.click;
			hbox.style.cssText = this.css;
			hbox.firstChild.style.setProperty("margin", "0", "important");
			this.notify();
		})(win);
	},
	getUSS(pid) {
		var {ctypes} = ChromeUtils.import("resource://gre/modules/ctypes.jsm");
		var kernel32 = ctypes.open("kernel32");
		this.close = () => kernel32.close();

		// https://docs.microsoft.com/en-us/windows/win32/api/sysinfoapi/ns-sysinfoapi-system_info
		var sysInfo = ctypes.StructType("SYSTEM_INFO", [
			{m0: ctypes.unsigned_long},
			{dwPageSize: ctypes.unsigned_long},
			{m2: ctypes.voidptr_t},
			{m3: ctypes.voidptr_t},
			{m4: ctypes.unsigned_long},
			{m5: ctypes.unsigned_long},
			{m6: ctypes.unsigned_long},
			{m7: ctypes.unsigned_long},
			{m8: ctypes.short},
			{m9: ctypes.short}
		])();
		// https://docs.microsoft.com/en-us/windows/win32/api/sysinfoapi/nf-sysinfoapi-getnativesysteminfo
		// void GetNativeSystemInfo([out] LPSYSTEM_INFO lpSystemInfo);
		kernel32.declare(
			"GetNativeSystemInfo", ctypes.winapi_abi, ctypes.void_t,
			ctypes.voidptr_t
		)(sysInfo.address());
		var pageSize = sysInfo.dwPageSize;

		// https://msdn.microsoft.com/en-us/library/windows/desktop/ms684320(v=vs.85).aspx
		// HANDLE WINAPI OpenProcess(_In_ DWORD dwDesiredAccess, _In_ BOOL  bInheritHandle, _In_ DWORD dwProcessId);
		var OpenProcess = kernel32.declare(
			"OpenProcess", ctypes.winapi_abi, ctypes.voidptr_t,
			ctypes.unsigned_long, ctypes.bool, ctypes.unsigned_long
		);
		// https://msdn.microsoft.com/en-us/library/windows/desktop/ms724211(v=vs.85).aspx
		// BOOL WINAPI CloseHandle(_In_ HANDLE hObject);
		var CloseHandle = kernel32.declare(
			"CloseHandle", ctypes.winapi_abi, ctypes.bool,
			ctypes.voidptr_t
		);
		// https://docs.microsoft.com/en-us/windows/win32/api/psapi/nf-psapi-queryworkingset
		// BOOL QueryWorkingSet([in] HANDLE hProcess, [out] PVOID pv, [in] DWORD cb);
		var QueryWorkingSet = kernel32.declare(
			"K32QueryWorkingSet", ctypes.winapi_abi, ctypes.bool,
			ctypes.voidptr_t, ctypes.voidptr_t, ctypes.unsigned_long
		);
		// https://docs.microsoft.com/en-us/windows/win32/procthread/process-security-and-access-rights
		// PROCESS_QUERY_INFORMATION | PROCESS_VM_READ
		var desiredAccess = 0x0400 | 0x0010;

		var num = ctypes.int64_t(0);
		var numArgs = [num.address(), ctypes.int64_t.size];

		// https://searchfox.org/mozilla-central/source/xpcom/base/nsMemoryReporterManager.cpp
		return (this.getUSS = pid => {
			var res = 0;
			try {
				var handle = OpenProcess(desiredAccess, false, pid);
				if (handle.isNull()) return res;

				QueryWorkingSet(handle, ...numArgs);
				if (num.value) {
					var entries = 2 * num.value;

					// https://docs.microsoft.com/en-us/windows/win32/api/psapi/ns-psapi-psapi_working_set_information
					var wsInfo = ctypes.StructType("PSAPI_WORKING_SET_INFORMATION", [
						{NumberOfEntries: ctypes.unsigned_long},
						{WorkingSetInfo: ctypes.ArrayType(ctypes.uint64_t, entries)}
					])();
					if (QueryWorkingSet(
						handle, wsInfo.address(), wsInfo.WorkingSetInfo.constructor.size
					)) {
						var {NumberOfEntries, WorkingSetInfo} = wsInfo;
						var privatePages = 0;
						// https://docs.microsoft.com/en-us/windows/win32/api/psapi/ns-psapi-psapi_working_set_block
						for(var ind = 0; ind < NumberOfEntries; ind++) {
							var flags = WorkingSetInfo[ind] >>> 55;
							if (!(flags & 1) || flags >>> 1 & 7 <= 1)
								privatePages++;
						}
						res = privatePages * pageSize;
					}
				}
				CloseHandle(handle);
			} catch {};
			return res;
		})(pid);
	},
	async notify() {
		var bytes = 0, pids = [];
		for(var dp of ChromeUtils.getAllDOMProcesses()) try {
			var [pid, mem] = await dp.getActor(this.name).sendQuery("");
			pids.push(pid);
			bytes += mem;
		} catch {}

		var {children} = await ChromeUtils.requestProcInfo();
		for(var {pid} of children)
			if (!pids.includes(pid))
				bytes += this.getUSS(pid);

		this.timer.initWithCallback(this, this.delay, this.timer.TYPE_ONE_SHOT);

		var prev = this.val;
		if ((this.val = this.mgb(bytes)) != prev)
			for(var win of CustomizableUI.windows) {
				var lab = win.document.getElementById(id);
				if (lab) lab.value = this.val;
			}
		//bytes > 734003200 && this.launch();
	},
	mgb: bytes => bytes < 1073741824
		? String(Math.round(bytes / 1048576))
		: (bytes / 1073741824).toFixed(2)
}).init("browser-delayed-startup-finished"))("ucf-mem-uss-indicator");
Выделить код

Код:

var EXPORTED_SYMBOLS = ["UCFMemIndReporterChild"];
var pid = Cc["@mozilla.org/xre/app-info;1"].getService(Ci.nsIXULRuntime).processID;
var mrm = Cc["@mozilla.org/memory-reporter-manager;1"].getService(Ci.nsIMemoryReporterManager);
class UCFMemIndReporterChild extends JSProcessActorChild {receiveMessage() {return [pid, mrm.residentUnique];}}

ВВП пишет

Не могу вставить var args = [link,"/add"];

Перед process.runwAsync(args, args.length);
добавить args.push("/add");


kokoss пишет

Возможно ли сюда добавить кнопку: "отключения"

Не, задача добавления в расширение нового функционала не стоит,
только сохранение старого, с приемлимыми потерями.
К тому же, это довольно сложно.

Отсутствует

 

№1599711-11-2021 10:22:15

kokoss
Участник
 
Группа: Members
Зарегистрирован: 15-02-2018
Сообщений: 1734
UA: Firefox 52.0

Re: Custom Buttons

Dumby
Понятно, тогда ещё один вопрос по кнопке "Открыть папки и файлы Firefox", как открыть файл config.js находящийся в папке App/firefox64? Нашёл только вариант как открыть этот файл в папке App/firefox -> value: "CurWorkD,,config.js"

Add, нашёл, "GreD"

Отредактировано kokoss (11-11-2021 17:01:12)


Win7

Отсутствует

 

№1599811-11-2021 10:57:00

ВВП
Участник
 
Группа: Members
Зарегистрирован: 13-03-2021
Сообщений: 333
UA: Firefox 94.0

Re: Custom Buttons

Dumby

Dumby пишет

И, тогда уж, и в jsm'ке только residentUnique оставить, вроде так ближе к «Task».

Не понял ? Убрать или оставить?  Тронул и ram вместо цифр ....Не трогаю JSM ...Вроде, все близко к TASK как в 93...
Короче, убрал

скрытый текст
var prop = ai.processType == ai.PROCESS_TYPE_DEFAULT ? "resident" : "residentUnique";
, получил самый близкий результат к Task.Если это не косяк, то это то что надо ! Нет, не то ...Что значит "только residentUnique оставить" ?
Хотя, с новым скриптом показывает даже точнее, чем в 92 и 93...Респект,однозначно !

Отредактировано ВВП (11-11-2021 22:22:06)

Отсутствует

 

№1599911-11-2021 11:46:05

Dobrov
Участник
 
Группа: Members
Зарегистрирован: 04-10-2011
Сообщений: 469
UA: Firefox 88.0

Re: Custom Buttons

del

Отредактировано Dobrov (11-11-2021 18:01:43)

Отсутствует

 

№1600011-11-2021 23:08:05

Dumby
Участник
 
Группа: Members
Зарегистрирован: 12-08-2012
Сообщений: 2214
UA: Firefox 78.0

Re: Custom Buttons

ВВП пишет

Что значит "только residentUnique оставить" ?

Это часть строки комментария,
который объясняет почему предлагается изменить memreporter.jsm


Сам изменённый memreporter.jsm (с "только residentUnique оставленным")
идёт вторым (не первым) кодом под спойлером.

Отсутствует

 

Board footer

Powered by PunBB
Modified by Mozilla Russia
Copyright © 2004–2020 Mozilla Russia GitHub mark
Язык отображения форума: [Русский] [English]