Skip to content

Instantly share code, notes, and snippets.

View nurullah's full-sized avatar

Nurullah Sevinçtekin nurullah

View GitHub Profile
@nurullah
nurullah / saveUTMParameters.js
Last active November 4, 2022 18:26
Save the UTM parameteres in localStorage for a month
function saveUTMParameters() {
var params = Object.fromEntries(new URLSearchParams(document.location.search));
// utm_campaign exists
if (Object(params).hasOwnProperty('utm_campaign')) {
var date = new Date();
var expires_date = new Date(date);
expires_date.setMonth(date.getMonth() - 1);
// get current utm history or create empty array
@nurullah
nurullah / keyboard-tooltip.css
Last active February 26, 2023 14:17
CSS Tooltip for Keys of the Simple Keyboard plugin
.simple-keyboard .hg-button { position: relative; }
.simple-keyboard .hg-button:before {
background: #333;
border-radius: 4px;
box-shadow: 0 2px 10px 2px rgba(0, 0, 0, .1);
color: #fff;
font-size: 13px;
padding: 5px 10px;
position: absolute;
bottom: calc(100% + 10px);
@nurullah
nurullah / embed-react-build.js
Created November 29, 2021 08:27
Embed React Build on All Sites
function EmbedReactBuild() {
this.url;
this.dependencies;
this.setURL = function(url) {
this.url = url;
}
this.setDependencies = function(dep) {
this.dependencies = dep;