Skip to content
View jorgeortega's full-sized avatar
💭
Learning all the time
💭
Learning all the time

Block or report jorgeortega

Block user

Prevent this user from interacting with your repositories and sending you notifications. Learn more about blocking users.

You must be logged in to block users.

Please don't include any personal information such as legal names or email addresses. Maximum 100 characters, markdown supported. This note will be visible to only you.
Report abuse

Contact GitHub support about this user’s behavior. Learn more about reporting abuse.

Report abuse

Pinned Loading

  1. Check if window is fullscreen, maxim... Check if window is fullscreen, maximized or not maximized
    1
    const isAtMaxWidth = screen.availWidth - window.innerWidth === 0
    2
    const screenPixelRatio = (window.outerWidth - 8) / window.innerWidth
    3
    const isAtDefaultZoom = screenPixelRatio > 0.92 && screenPixelRatio <= 1.10
    4
    const isMaximizedAndDefaultZoom = isAtMaxWidth && isAtDefaultZoom
    5
    const isFullscreen = window.outerWidth == screen.width && window.outerHeight == screen.height
  2. React Simple Stateless Component React Simple Stateless Component
    1
    import React from 'react'
    2
    import { string } from 'prop-types'
    3
    import './_SimpleModal.css'
    4
    
                  
    5
    export function SimpleModal ({ className }) {
  3. Get viewport dimension Get viewport dimension
    1
    export function getViewportDimensions () {
    2
      const w = window
    3
      const d = document
    4
      const e = d.documentElement
    5
      const g = d.getElementsByTagName('body')[0]
  4. Examples Examples Public

    General repo to test things

    JavaScript