This file contains hidden or 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
| .smooth-scroll { | |
| transition: transform .5s ease-out; | |
| } |
This file contains hidden or 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
| $.fn.responsiveTable = (function() { | |
| var $window = $(window); | |
| return function() { | |
| var $el = this; | |
| var $table = this.find('>table'); | |
| var onResize = function() { | |
| var width = $table.outerWidth(); | |
| var height = $table.outerHeight(); | |
| var $parent = $el.parent(); | |
| var containerWidth = $parent.width(); |
This file contains hidden or 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
| let scrollbarWidth; | |
| export default function measureScrollBarWidth(opts = {}) { | |
| const { force = false } = opts; | |
| if (force || typeof scrollbarWidth === "undefined") { | |
| const div = document.createElement("div"); | |
| div.style.position = "absolute"; | |
| div.style.overflowY = "scroll"; | |
| div.style.width = div.style.height = "100px"; |
This file contains hidden or 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 isStandalone () { | |
| if ('standalone' in window.navigator) { | |
| return window.navigator.standalone | |
| } else { | |
| return window.matchMedia('(display-mode: standalone)').matches | |
| } | |
| } |
This file contains hidden or 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 isPinchZooming () { | |
| const clientWidth = document.documentElement.clientWidth | |
| const viewportWidth = window.visualViewport ? window.visualViewport.width : window.innerWidth | |
| return clientWidth > viewportWidth | |
| } |
This file contains hidden or 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
| @font-face { | |
| font-family: Emoji; | |
| src: local('Hiragino Kaku Gothic ProN'), | |
| local(Meiryo); | |
| } | |
| @font-face { | |
| font-family: Emoji; | |
| src: local('Segoe UI Emoji'), | |
| local('Segoe UI Symbol'), |
This file contains hidden or 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 hiragana_random(size) { | |
| var str = ''; | |
| while (size--) { | |
| str += String.fromCharCode(12353 + Math.floor(Math.random() * 82)); | |
| } | |
| return str; | |
| } |
This file contains hidden or 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 fromIntArray(array) { | |
| var str = ''; | |
| var octet = new Uint8Array(new Uint32Array(array).buffer); | |
| for (var i = 0; i < octet.length; i++) { | |
| str += String.fromCharCode(octet[i]); | |
| } | |
| return btoa(str); | |
| } | |
| function toIntArray(ascii) { |
This file contains hidden or 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
| h1 {} | |
| /* ====================================================== | |
| // | |
| // ほげほげほげ | |
| // ふがふがふが | |
| // | |
| // ====================================================== */ | |
| // ====================================================== |
This file contains hidden or 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
| // 2016-09-23 リポジトリにしました。 | |
| // https://github.com/tsmd/twitter-text-tweetlength-js |