Skip to content

Instantly share code, notes, and snippets.

View MohammadMD1383's full-sized avatar
💭
I may be slow to respond.

Mohammad Mostafa Dastjerdi MohammadMD1383

💭
I may be slow to respond.
View GitHub Profile
@MohammadMD1383
MohammadMD1383 / include-html.ts
Created June 1, 2021 13:43
includes the contents of a file to current position it is in a html document
class IncludeHtml extends HTMLElement {
static get observedAttributes(): Array<string> {
return ["url"];
}
constructor() {
super();
}
connectedCallback(): void {
@MohammadMD1383
MohammadMD1383 / AndroidProgressBar.ts
Created June 1, 2021 13:15
an Android like progress ring/bar for html
class AndroidProgressBar extends HTMLElement {
#root: ShadowRoot;
#svg: SVGSVGElement;
#circle: SVGCircleElement;
static #MIN_SPEED_RATE: number = 1.5;
static #MAX_SPEED_RATE: number = 3;
constructor() {
super();
@MohammadMD1383
MohammadMD1383 / Modal.js
Last active December 14, 2020 11:25
use this module to create your bootstrap modals easily with javascript.
export default class Modal {
/** @type {boolean} */
static #isModalOpen = false;
/** @type {boolean} */
static #isRtl = false;
/** @param {boolean} bool */
static set isRtl(bool) {