With the stroke of a pen, Mayor Bill de Blasio could end the sidewalk-shed scourge in New York without compromising pedestrian safety.

All it would take, say building owners, is to reverse draconian regulations enacted by the Giuliani administration in 1998 after a falling masonry incident on Madison Avenue.

Giuliani’s Local Law 11 compounded the red tape already in place for a decade following the tragic death of Barnard College freshman Grace Gold after she was struck on the head by falling masonry on the Upper West Side.

Instead of a visual inspection from the street every five years of the main facade of a building, the new law required scaffolding and sidewalk sheds to be erected on every exposed side of the building for so-called “tap and listen” inspections to be conducted. Expensive repair work recommended in the process must be carried out, creating a lucrative industry with dubious safety benefits and endless opportunity for rip-offs.

For instance, condo owners at one 14-story building on Fifth Avenue have been told the limestone repair work on their building will cost a staggering $5 million. They will have to get competing bids for the work and put financing in place to pay for it, a process that could take many months, if not years, while the scaffolding remains.

This abundance of red tape is what has led to 300 miles of ugly scaffolding across the city — some in place for as long as 13 years.

The companies that provide the hated plywood-and-pipe structures have benefited from windfall profits amid whispers of kickbacks for building managers.

Giuliani’s intervention “tremendously increased the cost of inspections,” says Frank Ricci, director of government affairs at the Rent Stabilization Association. The group represents owners who oppose laws proposed by City Councilman Ben Kallos to limit the time scaffolding remains in place.

Tightwad building owners are blamed for keeping sidewalk sheds up interminably to avoid expensive repair work, but Ricci claims they are victims of mismanagement and cowardice by the city which has ignored their sensible suggestions for remedies.

“Owners do not want to put scaffolding up,” says Ricci. “It’s the necessary evil. We have no choice.”

He explains that delays in removing sheds are due in part to owners having to arrange financing for what can be millions of dollars worth of remedial work, on top of an average $100,000 cost of inspections.

There is the added complication that tens of thousands of buildings are in the more than 70 landmarked districts across the city, which means owners have to apply for permits from the Landmarks Preservation Commission as well as from the Department of Buildings.

The process takes months and requires the services of an “expediter” at additional cost.

Ricci has two proposals: First, the city should return to the pre-1998 regime of five-year inspections of only the main façade. Second, if no problem is found after two inspections, the owners should be able to wait 10 years until the next inspection. Altering Local Law 11 to extend inspection intervals for new buildings makes sense as well.

Other people have suggested the use of radar technology and drones to inspect buildings, which would not require scaffolding to be erected.

But the suggestions have fallen on deaf ears. The city is just looking to make life harder for owners without amending the onerous regulations which created the sidewalk-shed scourge in the first place.

The result is that the quality of life for New Yorkers has declined. Scaffolding continues to obliterate light into buildings, attract homeless encampments and become refuse dumps, as well as de facto toilets for irresponsible dog owners.

Despite the fact New York is unique among world cities to be suffocated by scaffolding and sidewalk sheds, the Department of Buildings maintains they are necessary “for protecting New Yorkers against the dangers of falling debris in our vertical city,” says spokesman Andrew Rudansky.

He cites as further justification the 2015 tragedy of 2-year-old Greta Greene, who died after being hit by a brick which fell from an eighth-floor window ledge on the Upper West Side.

The city’s solution is to crack down on owners, with criminal action against “the worst offenders” who have left sheds up for 10 years or more, and a promise of further sanctions early next year, including fines up to $1,000 a day on owners with sheds up for more than three years.

In highly trafficked areas in “core” Manhattan, Rudansky says the city will have removed 20 of 51 sheds by the end of this month, with another 17 to be removed by December next year.

In other words, you can expect sidewalk sheds to remain a fact of life in New York, although they may not linger as long.

However, there is an opportunity to make your opinion heard. On Dec. 30, the Department of Buildings is holding a public hearing on its facade inspection regime.

If you are sick of the scourge of sidewalk sheds, here is your chance to tell de Blasio that safety must be leavened with common sense.

Pelosi’s party loves to hate

House Speaker Nancy Pelosi sure is touchy about the word “hate,” exploding at a reporter last week who dared to ask if she hated President Trump.

She claims she is full of Catholic love and prayers for the president.

But while she may not hate the man, her party and its media lapdogs incite hatred against Trump and his supporters every day.

The Democratic Party has become the nation’s biggest hate group. Impeachment is just their way to appease the monster they’ve unleashed and don’t know how to tame.

Bully Biden hot on the grill

In the other political meltdown of the week, Joe Biden showed himself to be unprepared and incapable of answering a reasonable question from an 83-year-old Democratic voter about his son, Hunter, without resorting to angry insult and abuse.

It is extraordinary that he still has not found a way to satisfactorily explain how the unqualified son of a vice president came by a lucrative position on the board of a Ukrainian energy company seeking to gain influence in the United States.

Biden can bluster and bully all he likes, but it’s an answer he eventually will have to give to the American people if he expects them to elect him president.