The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 2,977 other subscribers

Archive for the ‘Chrome’ Category

Some links I on Windows Memory Compression I want to check out

Posted by jpluimers on 2023/01/24

I’m not sure yet why sometimes my system is lagging with the combination of these four circumstances on a Windows 10 system with 32 gigabyte of memory:

  1. Process Explorer showing low (less than 10%) CPU usage
  2. Process explorer showing Memory Compression using more than 2 gigabytes of Working Set
  3. System Commit being larger than 20 gigabyte
  4. Lots of Chrome tabs open (no easy way to total memory usage, but likely 16 gigabyte or more)

Windows Compression was introduced in Windows 10 (back in 2015) and I’m still fairly new to it.

So here are some links I want to eventually dig into to make myself more familiar with it, and see if it affects Chrome runtime behaviour:

Thanks [Wayback/Archive] magicandre1981, [Wayback/Archive] peterh, [Wayback/Archive] Raymond Burkholder, and [Wayback/Archive] Falco Alexander for the above questions and answers.

From them, I learned that on a UAC elevated administrative command prompt, you can use these PowerShell for managing Memory Compression:

  1. Get-MMAgent shows the current Memory Compression state
  2. Disable-MMAgent -mc disables Memory Compression (requires a reboot)
  3. Enable-MMAgent -mc enables Memory Compression (requires a reboot)

BTW:

–jeroen

Posted in Chrome, Google, Power User, procexp Process Explorer, SysInternals, Windows, Windows 10 | Leave a Comment »

google chrome devtools – Use JavaScript to set value of textbox when .value and events don’t seem to work – Stack Overflow

Posted by jpluimers on 2022/11/29

For my link archive: [Wayback/Archive] google chrome devtools – Use JavaScript to set value of textbox when .value and events don’t seem to work – Stack Overflow

TL;DR

Sometimes fields are blocked from pasting values.

Normally a trick like this works in the chrome development panel console:

document.getElementById('nonPasteElementID').value = 'myValueFromTheClipboard'

With some web development environments this does not work.

For react, after finding the react render name for the input (in the case of the answer, it was “reactNameForInputElement“) this is a solution:

To make it work you will need this:

const input = document.getElementById('nonPasteElementID');
const event = new Event('reactNameForInputElement', { bubbles: true });
input.value = '1';
input.dispatchEvent(event);

–jeroen

Posted in Chrome, Chrome, Development, Google, JavaScript/ECMAScript, Power User, Scripting, Software Development, Web Browsers, Web Development | Leave a Comment »

Converting an html dl (delimited list) on a page to a table from the Chrome console

Posted by jpluimers on 2022/09/14

A while ago, I wanted to convert the dl delimited list html element on a web page into a regular table so I could more easily reorder the data into cells.

So I ran the below bit of code in the Chrome Console after first putting the mentioned table with id here_table in the place where I wanted the table to be included:


<table id="here_table"></table>

view raw

_table.html

hosted with ❤ by GitHub


var arr = $("#delimitedList").children().map(function () {
return $(this).html();
}).get();
for (var i = 0; i < arr.length; i += 2) {
$('#here_table').append('<tr><td>' + arr[i] + '</td><td>' + arr[i + 1] + '</td></tr>');
}

For this script to work, you need jQuery, so yesterday I wrote Better, Stronger, Safer jQuerify Bookmarklet | Learning jQuery.

The code is based on [Wayback/Archive.is] Rebuild each definition list () as a table using JQuery – Stack Overflow (thanks [Wayback/Archive.is] easy!) with an important adoption instead of calling text() to get the textual dt and dd information, it uses html() so the original innerHTML is being preserved.

Some similar JavaScript pieces of code are at [Wayback/Archive.is] Turning HTML into a nested JavaScript array with jQuery – Stack Overflow.

Related:

–jeroen

Posted in Bookmarklet, Chrome, Development, Google, JavaScript/ECMAScript, jQuery, Pingback, Power User, Scripting, Software Development, Stackoverflow, Web Browsers, Web Development | Leave a Comment »

On my list of things to try: chrome flag: global-media-controls (older article, it’s live in stable now)

Posted by jpluimers on 2022/09/12

[WayBack] Roderick Gadellaa on Twitter: “My new favorite chrome flag: global-media-controls (older article, it’s live in stable now)… “

[WayBack ]Chrome is testing new media playback controls that can even work with background tabs

To enable to controls, head to chrome://flags/#global-media-controlsAfter a browser restart, you’ll see a play button in your toolbar next to the extensions whenever you have media playing in Chrome. Clicking it will show the title of what’s playing, where it’s playing from, and provide play/pause and skip buttons.

–jeroen

Posted in Chrome, Google, Power User | Leave a Comment »

Automatically reload page in Chrome without plugin – Super User

Posted by jpluimers on 2022/07/14

Below is a cool solution to refresh a page using a bookmarklet is to embed it into an iframe, then automatically reload it every interval.

It for instance works for the [Wayback/Archive.is] Woonveilig and often in Fritz!Box environments.

[Wayback] Jon described the below method as a solution for his own question, 6 years after asking it in [Wayback/Archive.is] Automatically reload page in Chrome without plugin – Super User.

So I made this a bookmark:


javascript:document.getElementsByTagName("body")[0].innerHTML = "<iframe id=\"testFrame\" src=\""+window.location.toString()+"\" style=\"position: absolute; top:0; left:0; right:0; bottom:0; width:100%; height:100%;\"><\/iframe>";reloadTimer = setInterval(function(){ document.getElementById("testFrame").src=document.getElementById("testFrame").src },5*60*1000)

(it is in a gist as the WordPress editors keep killing the embedded html code, despite it being escaped within <code> tags.

–jeroen

Posted in Bookmarklet, Chrome, Chrome, Development, Firefox, Google, HTML, JavaScript/ECMAScript, Power User, Scripting, Software Development, Web Browsers, Web Development | Leave a Comment »

 
%d bloggers like this: