Skip to content

Instantly share code, notes, and snippets.

View fahadashiq12's full-sized avatar
:octocat:
Contributing

Fahad Ashiq ⚡ fahadashiq12

:octocat:
Contributing
View GitHub Profile
@fahadashiq12
fahadashiq12 / FrontendFrameworksPopularity.md
Created February 17, 2022 06:16 — forked from tkrotoff/FrontendFrameworksPopularity.md
Front-end frameworks popularity (React, Vue, Angular and Svelte)

Findings: React is by far the most popular front-end framework/library (and continues to grow faster), except for the GitHub stars. In addition, React is more loved and "wanted" than other front-end frameworks (although it is more used: satisfaction tends to decrease with popularity).

Charts are from different sources and thus colors are inconsistent, please carefully read the chart's legends.

Like this? Check https://gist.github.com/tkrotoff/93f5278a4e8df7e5f6928eff98684979

Stack Overflow trends

https://insights.stackoverflow.com/trends?tags=reactjs%2Cvue.js%2Cangular%2Csvelte%2Cangularjs

@fahadashiq12
fahadashiq12 / stop-video.js
Created October 6, 2020 11:29 — forked from cferdinandi/stop-video.js
A simple method to stop YouTube, Vimeo, and HTML5 videos from playing.
/**
* Stop an iframe or HTML5 <video> from playing
* @param {Element} element The element that contains the video
*/
var stopVideo = function ( element ) {
var iframe = element.querySelector( 'iframe');
var video = element.querySelector( 'video' );
if ( iframe ) {
var iframeSrc = iframe.src;
iframe.src = iframeSrc;
@fahadashiq12
fahadashiq12 / stop-video.js
Created October 6, 2020 11:29 — forked from cferdinandi/stop-video.js
A simple method to stop YouTube, Vimeo, and HTML5 videos from playing.
/**
* Stop an iframe or HTML5 <video> from playing
* @param {Element} element The element that contains the video
*/
var stopVideo = function ( element ) {
var iframe = element.querySelector( 'iframe');
var video = element.querySelector( 'video' );
if ( iframe ) {
var iframeSrc = iframe.src;
iframe.src = iframeSrc;
/**
* Enables scrolling to a class instead of an ID for applications like Moodle that use YUI.
* YUI often litters your HTML code adding what appears to be random ID's for every element. This means that you can't
* actually use ID's in your HTML, and hence, cannot create in-page links. This solves that problem.
* Usage:
* 1) Add this code to your web page.
* 2) Add a class called goto-WhatEverYouWant such as class="goto-section5" to an element.
* 3) When you load the page, any classes starting with goto- will become an ID for that element.
* This will enable you to create in-page links such as <a href="#section5">Section 5</a>
* Consider combining this with the optional smooth scrolling Gist for a nice touch.
/**
* Enables scrolling to a class instead of an ID for applications like Moodle that use YUI.
* YUI often litters your HTML code adding what appears to be random ID's for every element. This means that you can't
* actually use ID's in your HTML, and hence, cannot create in-page links. This solves that problem.
* Usage:
* 1) Add this code to your web page.
* 2) Add a class called goto-WhatEverYouWant such as class="goto-section5" to an element.
* 3) When you load the page, any classes starting with goto- will become an ID for that element.
* This will enable you to create in-page links such as <a href="#section5">Section 5</a>
* Consider combining this with the optional smooth scrolling Gist for a nice touch.