SACRAMENTO — Tweeting jurors beware. Gov. Jerry Brown on Friday signed legislation that will admonish jury members not to mix their civic duty with social media during trials.

Courts will soon be required to explicitly warn jurors not to share case details or research potential case information via texts, blogs, Internet postings or various social networking sites. The new law also clarifies that judges have the authority to hold in contempt any jurors who don’t heed that admonition.

Although many courts already provide such warnings, the Judicial Council sought the law because “jurors’ use of electronic devices during the course of a trial is becoming an increasingly significant threat to the integrity of the justice system,” according to a council statement in support of the bill.

In 2009, a San Francisco Superior Court judge dismissed 600 potential jurors because one admitted he had used the Internet to research the case. In 2008, a Ventura County Superior Court judge chastised a jury foreman for posting details of a homicide trial, including a photo of the murder weapon, on his blog. The defendant, found guilty, appealed his conviction.

Gov. Arnold Schwarzenegger vetoed an identical version of the bill in 2010, saying any problem with misbehaving jurors should be handled by a rule of court, not a new law.

On Friday Gov. Brown also vetoed legislation that would have encouraged the creation of specialized courts for veterans around the state. The governor called the bill “well-intended” but questioned its potential costs.

“Given budget constraints, the decision to adopt this kind of program — something already within the courts’ authority — is better left to the sound discretion of the judiciary,” Brown said in his veto message.

Brown also rejected a bill that would have allowed homeless people to sue under the Ralph Civil Rights Act if they were physically attacked because of their homeless status. The governor said homeless victims are already adequately protected by state civil and criminal laws.