View web.config
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<configuration> | |
<system.webServer> | |
<rewrite> | |
<rules> | |
<clear /> | |
<rule name="Redirect to www" stopProcessing="true"> | |
<match url=".*" /> | |
<conditions logicalGrouping="MatchAny"> | |
<add input="{HTTPS}" pattern="off" ignoreCase="true" /> |
View FAQPage-structured-rich-results.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html lang="tr" itemscope itemtype="https://schema.org/FAQPage"> | |
<body> | |
<div itemscope itemprop="mainEntity" itemtype="https://schema.org/Question"> | |
<h2 itemprop="name">Sample Question 1?</h2> | |
<div itemprop="acceptedAnswer" itemscope itemtype="https://schema.org/Answer"> | |
<div itemprop="text"> | |
<p>Answer example 1</p> | |
</div> | |
</div> |
View custom-scrollbar.css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
::-webkit-scrollbar { | |
width: 5px; | |
} | |
::-webkit-scrollbar-thumb { | |
background-color: black; | |
} | |
::-webkit-scrollbar-track { | |
box-shadow: inset 0 0 2px gray; |
View .htaccess
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://stackoverflow.com/a/36986520 | |
RewriteEngine On | |
RewriteCond %{HTTP_HOST} example\.com$ | |
RewriteCond %{HTTPS} off [OR] | |
RewriteCond %{HTTP_HOST} !^www\. [NC] | |
RewriteRule (.*) https://www.example.com%{REQUEST_URI} [L,R=301] |
View cjs - search_term (q).js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// cjs variable name: cjs - search_term (q) | |
function() { | |
var params = new URLSearchParams(window.location.search); | |
return params.get('q'); | |
} |
View createObserver.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** @return IntersectionObserver */ | |
function createObserver(p_threshold) { | |
return new IntersectionObserver( | |
(entries) => { | |
entries.forEach((/** @type IntersectionObserverEntry */ entry) => { | |
if (entry.isIntersecting) { | |
const eventIntersecting = new CustomEvent("intersecting"); | |
entry.target.dispatchEvent(eventIntersecting); | |
return; | |
} |
View intersection-observer.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// define the observer | |
const observer = new IntersectionObserver((entries) => { | |
entries.forEach((/** @type IntersectionObserverEntry */ entry) => { | |
if (entry.isIntersecting) { | |
const eventIntersecting = new CustomEvent("intersecting"); | |
entry.target.dispatchEvent(eventIntersecting); | |
return; | |
} | |
const eventNotIntersecting = new CustomEvent("not-intersecting"); | |
entry.target.dispatchEvent(eventNotIntersecting); |
View fetch-send-post-data.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const the_form = document.getElementById('the_form'); | |
const formData = new FormData(the_form); | |
fetch('the-handler.php',{ | |
method: 'POST', | |
body: formData | |
}) | |
.then(response => response.json()) | |
.then(data => { | |
console.log('data is:', data); | |
}); |
View instagram-gradient.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<style> | |
.instagram-link { | |
display: block; | |
background-image: linear-gradient(49.12deg, #fd5 6.61%, #FF543E 50.05%, #C837AB 93.49%); | |
border-radius: 50%; | |
width: 45px; | |
height: 45px; | |
} | |
</style> |
View gtm-onscroll.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function documentScrolled() { | |
console.log('document is scrolled'); | |
document.removeEventListener('scroll', documentScrolled); | |
} | |
document.addEventListener('scroll', documentScrolled); |
NewerOlder