Giter Site home page Giter Site logo

Comments (1)

mems avatar mems commented on May 21, 2024 1

If you don't see the popup, it's because your browser popup blocker is active. A bookmarklet (or any other page scripts) can't open a popup without be executed by a user click in the page, else otherwise the popup will be blocked. Sadly this extension can't do anything for that

I clean up a bit the bookmarlet for intelligibility (remove comments and spaces) and fix the URL of Google calendar (for the event title part) and it works (if you click on blocked popup in the Yellow bar of Firefox):

javascript:var%20s;if(window.getSelection){s=window.getSelection();}else%20if(document.getSelection){s=document.getSelection();}else{s=document.selection.createRange().text;}if(s==''){prompt('QuickAdd');}var%20re=RegExp('[AaPp][Mm]');if%20(encodeURIComponent(s).match(re)){}else{var%20d=new%20Date();var%20hr=d.getHours();var%20min=d.getMinutes();if%20(min<10){min="0"+min;}s=s+"%20"+hr+":"+min;}void(window.open(encodeURI('https://www.google.com/calendar/event?text='+s+'&action=TEMPLATE&pprop=HowCreated:QUICKADD'),'addwindow','status=no,toolbar=no,width=520,height=470,resizable=yes'));

If you need to open the popup without been blocked, you need to rewrite this bookmarklet to show a button instead, then you could click on it to open the popup each time you use the bookmarklet

from bookmarklets-context-menu.

Related Issues (18)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.