Archive for the ‘JavaScript/ECMAScript’ Category
Posted by jpluimers on 2023/12/12
Based on these tweets, I want to write a bookmarklet that at least removes the s= and t= parameters from Twitter URLs, maybe even all parameters (TODO: figure out if there are useful Twitter URL parameters first):
Even Jack Dorsey didn’t know they were introduced when he was still Twitter CEO. From the tweets below:
- The
s parameter seems to have to have to do with both the kind of sharing and the type of client used.
- The
t parameter could correlate with the user ID.
There is a sort of bookmarklet below which goes through an external web-site (search for “unfurl”), but I want to do it purely client-side.
Read the rest of this entry »
Posted in Bookmarklet, Development, JavaScript/ECMAScript, Power User, Scripting, SocialMedia, Software Development, Twitter, Web Browsers | Leave a Comment »
Posted by jpluimers on 2023/12/04
The basic options for logging an HTML Element using JavaScript are for instance described in [Wayback/Archive] google chrome – How can I log an HTML element as a JavaScript object? – Stack Overflow (thanks [Wayback/Archive] Ben Flynn for asking and [Wayback/Archive] Mathias Bynens for answering)):
Use console.dir:
var element = document.documentElement; // or any other element
console.log(element); // logs the expandable <html>…</html>
console.dir(element); // logs the element’s properties and values
Both log all html or all properties even though often these are enough (most via [Wayback/Archive] Element – Web APIs | MDN):
Read the rest of this entry »
Posted in Development, HTML, HTML5, JavaScript/ECMAScript, Scripting, Software Development, Web Development | Leave a Comment »
Posted by jpluimers on 2023/11/29
Since I didn’t know that JavaScript could deconstruct (a superset of Parallel Assignment) [Wayback/Archive] Destructuring assignment – JavaScript | MDN of which I copied the topmost examples (there are far more in the rest of the article):
Read the rest of this entry »
Posted in Development, JavaScript/ECMAScript, Scripting, Software Development | Leave a Comment »
Posted by jpluimers on 2023/11/23
I wish I had known this ages ago: [Wayback/Archive] javascript – Chrome debugging – break on next click event – Stack Overflow (thanks [Wayback/Archive] D.R. for asking and [Wayback/Archive] Konrad Dzwinel for answering):
What you are looking for are [Wayback/Archive] ‘Event Listener Breakpoints‘ on the Sources tab. These breakpoints are triggered whenever any event listener, that listens for chosen event, is fired. You will find them in the Sources tab. In your case, expand ‘Mouse’ category and choose ‘Click’.
Read the rest of this entry »
Posted in Chrome, Chrome, Development, Google, HTML, HTML5, JavaScript/ECMAScript, Power User, Scripting, Software Development, Web Browsers, Web Development | Leave a Comment »
Posted by jpluimers on 2023/11/15
Posted in About, Autistic Spectrum/Autism, Development, Instagram, JavaScript/ECMAScript, Node.js, Personal, Scripting, SocialMedia, Software Development, Web Development | Leave a Comment »
Posted by jpluimers on 2023/10/31
Posted in Chrome, CSS, Development, Firefox, JavaScript/ECMAScript, Opera, Power User, Scripting, SocialMedia, Software Development, Web Browsers, Web Development, YouTube | Leave a Comment »
Posted by jpluimers on 2023/10/18
Last year, I answered [Wayback/Archive] javascript – Bookmarklet to append a string to a URL – Stack Overflow (asked by [Wayback/Archive] Karlo Guidoni Martins, thanks!).
It is about not being able to run bookmarklets on pages hosted by for instance:
gist.githubusercontent.com
raw.githubusercontent.com
GitHub is an exception, as RAW files from these services do work fine:
At first sight, when running a Bookmarklet on those RAW GitHub served pages, you do not see an error: it just looks like the Bookmarklet does not work at all. The last part is right, but in the Chrome console you can actually see the error.
That error lead me to my answer:
Read the rest of this entry »
Posted in Bookmarklet, Chrome, Development, Firefox, JavaScript/ECMAScript, Power User, Scripting, Software Development, Web Browsers, Web Development | Leave a Comment »
Posted by jpluimers on 2023/10/17
Posted in *nix, *nix-tools, bash, bash, Development, JavaScript/ECMAScript, jo, jq, JSON, man/manual pages, mankier, Power User, Python, Scripting, Software Development | Leave a Comment »
Posted by jpluimers on 2023/10/05
I like JSFiddle, but rather keep source code under my own version control.
I was curious, so queried [Wayback/Archive] gist as jssfiddle – Google Search and found [Wayback/Archive] Publishing a Github Gist to JSFiddle | Toolbox Tech
It has better steps than the official documentation at these links:
- [Wayback/Archive] Pass response directly from a Github repo – JSFiddle Docs
- [Wayback/Archive] Display fiddle from a Github repository – JSFiddle Docs
Demo Directory/
demo.js
demo.html
demo.css
demo.details
demo.[ js | html | css ] contains fiddle code for the specific panel
demo.details is a description of the demo written in YAML
---
name: Name of the Demo
description: Some description, please keep it in one line
authors:
- John Doe
- Jan Wisniewski
resources:
- http://some.url.com/some/file.js
- http://other.url.com/other_filename.css
normalize_css: no
load_type: d
...
- [Wayback/Archive] Display fiddle from Gist – JSFiddle Docs
Read a demo from Github Gist and present it as a fiddle.
Gist files structure
fiddle.js
fiddle.html
fiddle.css
fiddle.manifest
|
|
|
|
|
Contains fiddle code for the specific panel
|
|
|
YAML description of the Gist for JSFiddle to parse
|
Manifest file example
name: The Name of the Fiddle
description: Some description, please keep it in one line
authors:
- John Doe
- Jan Wisniewski
resources:
- http://some.url.com/some/file.js
- http://other.url.com/other_filename.css
normalize_css: no
wrap: bpanel_js: 1
panel_css: 1
Manifest fields
-
panel_html – Language for HTML panel. Accepts:
-
panel_css – Language for CSS panel. Accepts:
-
panel_js – Language for the JS panel. Accepts:
-
resources – List of external resources.
-
-
description – Fiddle description
-
normalize_css – Normalize CSS by loading normalize.css before any CSS declarations.
-
wrap – Set the JS code wrap. Options:
–jeroen
Posted in Development, DVCS - Distributed Version Control, gist, GitHub, JavaScript/ECMAScript, JSFiddle, Scripting, Software Development, Source Code Management | 1 Comment »