Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
The Stylesheet gem provides a parser for CSS Stylesheets based on the DOM API
Get styles from a document:
document = Stylesheet::Document.new("http://sportspyder.com")
=> #<Document location:http://sportspyder.com/>
document.style_sheets
=> [#<Stylesheet::CssStyleSheet:0x007fa905c58c20>,
#<Stylesheet::CssStyleSheet:0x007fa905c5f430>,
#<Stylesheet::CssStyleSheet:0x007fa905c5e968>]
Get attributes of a stylesheet:
sheet = document.style_sheets[0]
=> #<Stylesheet::CssStyleSheet:0x007fa905c58c20>
sheet.href
=> "http://sportspyder.com/assets/application-26ff2c8d54ab9cd8e74af60fc650390e.css"
sheet.type
=> "text/css"
Get stylesheet media definitions:
sheet.media.map {|medium| medium }
=> ["screen"]
Get rules defined in a stylesheet:
sheet = Stylesheet::CssStyleSheet.new("http://sportspyder.com/stylesheets/screen.css")
=> #<Stylesheet::CssStyleSheet:0x007fa905c58c20>
rule = sheet.css_rules[0]
=> #<Stylesheet::CssStyleRule>
rule.css_text
=> "iframe.editor{width:580px;height:150px;border:1px solid #ccc;background-color:#fff}"
rule.selector_text
=> "iframe.editor"
Get declarations defined in a style rules:
rule.style[0]
=> "width:580px"
rule.style.border
=> "1px solid #ccc"
To install Stylesheet, add the gem to your Gemfile:
gem "stylesheet"
Copyright (c) 2013 Derek DeVries
Released under the MIT License
FAQs
Unknown package
We found that stylesheet 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.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.