
Security News
Open Source Maintainers Demand Ability to Block Copilot-Generated Issues and PRs
Open source maintainers are urging GitHub to let them block Copilot from submitting AI-generated issues and pull requests to their repositories.
This provides asynchronous alternatives to alert, confirm and prompt.
If you're not using Rails, just grab the sources from lib/assets. If you're not using CoffeeScript, you can always convert the sources to JavaScript in the "Try CoffeeScript" tab in coffeescript.org.
Otherwise, just add "gem 'common-dialogs'" to your Gemfile and run bundle.
It also depends on jQuery-UI being installed. I recommend the jquery-ui-themes gem.
Then require the bundled assets after requiring jQuery UI.
For example, if you're using the jquery-ui-themes gem, your application.js would look like this:
//= require jquery
//= require jquery_ujs
//= require jquery-ui
//= require common-dialogs
CommonDialogs.require() // remove this if you don't want to add the helpers to the window object
And in application.css (see the supported themes list in the link above):
/*
= require jquery-ui/smoothness
= require common-dialogs
*/
showMessage 'Any message' # Dialog title is "Message" by default
showMessage 'Any message', title: 'Dialog Title', onClose: (-> console.log 'closed'), additionalClasses: 'success popup'
# the CSS classes in additionalClasses will be added to the dialog div
# All dialogs support those options.
showError 'An error message with alert icon'
confirmDialog 'Really remove task?', (-> console.log 'confirmed'), noAction: -> console.log 'answered no - this option is not required'
inputDialog 'What is your name?', ((name)-> console.log "Your name is #{name}"),
initialValue: 'Optional initial value'
required: false # true by default, which means that an empty string is not allowed by default
cancelAction: (-> console.log 'cancel was called - this option is not required')
Feel free to change the default messages and button names by changing the CommonDialogs.defaults object. Just inspect it (console.log(CommonDialogs.defaults)) to see what keys to change and what are their default values.
FAQs
Unknown package
We found that common-dialogs demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Open source maintainers are urging GitHub to let them block Copilot from submitting AI-generated issues and pull requests to their repositories.
Research
Security News
Malicious Koishi plugin silently exfiltrates messages with hex strings to a hardcoded QQ account, exposing secrets in chatbots across platforms.
Research
Security News
Malicious PyPI checkers validate stolen emails against TikTok and Instagram APIs, enabling targeted account attacks and dark web credential sales.