Skip to content

Instantly share code, notes, and snippets.

Avatar

Faris hijazi buzamahmooza

View GitHub Profile
@buzamahmooza
buzamahmooza / 32x8.com input assistant.js
Created Oct 12, 2018
A bookmarklet or browser script to allow for easy input on the 32x8.com kmap website. rather then ticking radio buttons one by one, this script takes on string and ticks all the radio buttons for you.
View 32x8.com input assistant.js
JavaScript:(function(){
if(!/www\.32x8\.com/.test(location.href)){ alert("This script only works on 32x8.com"); return; }
stringInput(prompt("Enter the minterms/maxterms in order from top to bottom (0,1,x):", "1 x 1 0 1 0 x 0"));
function stringInput(inputStr) {
const rows = Array.from(document.querySelectorAll('body > form > table > tbody tr')).slice(2, -1);
const terms = inputStr.match(/(1|0|x)/gmi);
console.log('terms:', terms);
for(let i=0; i<terms.length; i++){
if(i>=terms.length || i>=rows.length) break;
var idx=0;
@buzamahmooza
buzamahmooza / ocrad.min.js
Created Apr 9, 2018
A minified version of ocrad.js [I did NOT write the code] Creator of the code: https://github.com/antimatter15/ocrad.js Minified using: http://dean.edwards.name/packer/
View ocrad.min.js
This file has been truncated, but you can view the full file.
@buzamahmooza
buzamahmooza / Pinterest DL All Original Images.js
Created Mar 3, 2018
A bookmarklet to downloads all original images on a pinterest page. Just drag the code to your bookmarks or save it and add "JavaScript:" in the beginning, visit pinterest and click that bookmark, boom! magic!
View Pinterest DL All Original Images.js
if(typeof download !== 'function') {
alert("The download function was not found on this page, please run the 'downoader' script using tampermonkey."); void(0);
}
if(/www\.pinterest\./.test(location.href)){
var imgBoxes = document.querySelectorAll('._qk._2h._ql');
console.log('ImgBoxes:', imgBoxes);
if(confirm('Download '+imgBoxes.length+' images?'))
imgBoxes.forEach(function(imgBox, index, array){
try{
let img = imgBox.querySelector('img[srcset]');
@buzamahmooza
buzamahmooza / Go to original zscalar link.js
Created Jan 22, 2018
Redirects you to the url that ZScalar has blocked. This script is helpful when you want to visit a page (outside the ZScalar network) but you only have the ZScalar link to it.
View Go to original zscalar link.js
@buzamahmooza
buzamahmooza / Faris Handy Webdev JavaScript functions.user.js
Created Jan 15, 2018
A library for my commonly used JavaScript functions with user scripts.
View Faris Handy Webdev JavaScript functions.user.js
// ==UserScript==
// @name Faris Handy Webdev JavaScript functions
// @namespace http://tampermonkey.net/
// @version 0.1
// @description A bunch of useful JavaScript functions
// @description This is not a regular script for you to run! Only use this via the @require keyword.
// @author Faris Hijazi
// @grant unsafeWindow
// ==/UserScript==
@buzamahmooza
buzamahmooza / Add video keyboard shortcuts.user.js
Last active Nov 18, 2020
Adds keyboard shortcuts to HTML5 videos.
View Add video keyboard shortcuts.user.js
// ==UserScript==
// @name Video keyboard shortcuts
// @namespace https://github.com/buzamahmooza
// @version 0.5
// @description Adds keyboard shortcuts to HTML5 videos.
// Left Click: Toggle Pause/Play
// F or dblClk: Toggle Fullscreen
// SpaceBar: Toggle Pause/Play
// Left/Right: Navigate back/forward
// -,[ / =,]: - / + Playback speed
@buzamahmooza
buzamahmooza / Google Search Site Images.user.js
Last active Jan 24, 2018
Redirects you to Google images and searches for pictures of the text selection or the site URL. (If any text is selected )
View Google Search Site Images.user.js
q=(window.getSelection?window.getSelection():document.getSelection?document.getSelection():document.selection.createRange().text);
location.href="https://www.google.com/search?&tbm=isch&q="+((typeof q!=='string'||q.length<1?("site:"+location.hostname):(''+q)).replace(/\s+/g,"+"));
console.log('q=', q);
void(0);
@buzamahmooza
buzamahmooza / RARBG_Add Link & thumbnails.user.js
Last active Feb 6, 2018
Add a magnet link shortcut and thumbnails of torrents. Also adds a google image search link in case you want to see more pics of the torrent.
View RARBG_Add Link & thumbnails.user.js