Skip to content

Instantly share code, notes, and snippets.

💭
I may be slow to respond.

Anas Nakawa anasnakawa

💭
I may be slow to respond.
Block or report user

Report or block anasnakawa

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View console.color.js
/**
* acceps colors as arguments, and will simply print them out to console
*
* e.g: console.color('red', 'blue', 'green'); // prints red, blue and green squares
*/
console.color = function() {
var result = '';
var args = [];
for(var i = 0; i < arguments.length; i++) {
result += '%c ' + arguments[i] + ' ';
View auto-open-link-on-page-load.html
View pause-text-shows.html
<script type="text/javascript">
(function() {
'use strict';
/**
* configurations
*/
var tickersClass = 'my-paused-text-shows';
@anasnakawa
anasnakawa / rotate-tabs.html
Created Jun 14, 2018
snippet when it will be added to the page, it will rotate tabs every few seconds
View rotate-tabs.html
<script type="text/javascript">
(function() {
'use strict';
/**
* configurations
*/
var tabsClass = 'my-rotating-tabs'; // <- put the css class of the tabs you want to control
@anasnakawa
anasnakawa / pause-ticker.html
Last active Jun 14, 2018
snippet when it will be added to the page, it will pause one or more tickers shortpoint elements
View pause-ticker.html
<script type="text/javascript">
(function() {
'use strict';
/**
* configurations
*/
var tickersClass = 'my-paused-ticker';
@anasnakawa
anasnakawa / load-twitter-in-tabs.html
Last active Jun 12, 2018
script to load twitter timeline if its been added inside a shortpoint tab element
View load-twitter-in-tabs.html
<script type="text/javascript">
(function() {
'use strict';
var sTwitterScriptID = 'shortpoint-twitter-script';
/**
* hook method to be executed as soon as shortpoint
* is available in the page
@anasnakawa
anasnakawa / hide-side-nav.css
Last active Apr 10, 2018
hiding side navigation box on SharePoint root site homepage
View hide-side-nav.css
/* only on root site homepage, hide the side nav box */
[data-root-home=true] #sideNavBox {
display: none !important;
}
View execute-after-shortpoint.js
<script type="text/javascript">
(function() {
'use strict';
/**
* hook method to be executed as soon as shortpoint
* rendered on the page
*/
function ShortPointReady() {
View shortpoint-benchmarks.html
<script type="text/javascript">
(function() {
document.title = '';
function getNow() {
return ( Math.round( performance.now() / 10 ) / 100 );
}
document.addEventListener( 'DOMContentLoaded', function() {
document.title = 'dm:' + getNow();
});
View load-twitter.js
<script type="text/javascript">
(function() {
'use strict';
/**
* hook method to be executed as soon as shortpoint
* is available in the page
*/
function initHook() {
You can’t perform that action at this time.