Denver voters are facing a complicated choice between jobs, workers’ rights, and animal welfare.
By Raksha Vasudevan
October 23, 2024
Carcasses at Superior Farms, the last remaining slaughterhouse in Denver, Colorado. (Photo credit: Raksha Vasudevan)
Related
With her silver rings and turquoise bracelets, Mercedes Ortiz Gutierrez cuts a stylish figure. Her black cane with golden finishes could be mistaken for another accessory if she didn’t lean so heavily on it. Gingerly, she shuffles to the gray couch in her one-bedroom apartment in Thornton, Colorado, just outside Denver and five miles from the slaughterhouse where her life irrevocably changed.
Then 46, Gutierrez had been working at Superior Farms for two years, skinning slaughtered lambs and cleaving off their noses, tongues, and hooves. She also restocked the facility’s paper towels, soap, and aprons. On July 25, 2020, her hands clutching gallon containers of soap, she descended the stairs to the plant’s storage room.
Her manager had just ordered her to hurry. Rushed and unable to hang onto the handrail, Gutierrez misstepped, her right foot landing awkwardly on one of the stairs. X-rays later confirmed she’d fractured her ankle, becoming one of the thousands of workers injured in an industry that is both physically and mentally hazardous.
This November, Denver voters will decide on a ballot initiative banning all commercial slaughter in the city. If it passes, Superior—the city’s only remaining slaughterhouse—will shutter.
At the clinic, she was given a boot, crutches, and medicine. But as the days went by, the pain worsened. She initially returned to work, but doctors soon forbade her from doing so. A few weeks later, she claims Superior fired her. “Fundamentally, I no longer served them,” she said in an interview.
In the following months, Gutierrez’s pain was so severe she couldn’t sleep or shower. She was eventually diagnosed with Complex Regional Pain Syndrome, a chronic pain following injuries that doesn’t resolve as expected.
In November 2022, Gutierrez settled a workers’ compensation claim with Superior for $77,000. When asked for comment, Bob Mariano, Superior’s Director of Marketing, told Civil Eats that the company worked with the Colorado Department of Employment to manage her case throughout treatment. Once she reached “maximum medical improvement”—where additional treatment is unlikely to improve a condition—Mariano said a financial settlement based on workers’ comp regulations was a standard last step.
To Gutierrez, the compensation she received was not nearly enough. “It’s not the same anymore with the pain,” she said.
This November, Denver voters will decide on Initiated Ordinance 309, a ballot initiative banning all commercial slaughter in the city. If it passes, Superior—the city’s only remaining slaughterhouse—will shutter. This would eliminate at least 160 jobs but, according to animal rights activists, also stop the suffering of the 300,000 lambs slaughtered there everyyear.
But what might appear as a choice between animal welfare and workers’ livelihoods is actually more complicated: Stories like Gutierrez’s suggest some workers might also suffer at Superior, while several experts believe closing one slaughterhouse could worsen conditions—for animals, workers, local economies, and the environment—in and around other meat processing plants. It’s now up to voters to decide: Will getting rid of their city’s last slaughterhouse do more harm than good?
A Local Measure with National Implications
In 2020, America watched as outbreaks of COVID-19 ravaged meatpacking plants, killing hundreds of workers and infecting thousands more. As former President Donald Trump ordered the plants to stay open, neither employers nor the Occupational Safety and Health Administration (OSHA) did much to protect employees, who continued to fall sick and die. With slaughterhouse operations slowed, industrial feedlots grew overcrowded. Hundreds of thousands of animals were killed using “depopulation” methods like suffocation and drowning.
Yet, according to Austin Frerick, author of Barons: Money, Power, and the Corruption of America’s Food Industry, industrial farming has faced little consequence for its actions (or lack thereof). “They paid a fine, which is the cost of doing business for them,” he said. Bills introduced by members of Congress to add protections for workers have not gone anywhere.
Over 600 instances of non-compliance with U.S. Department of Agriculture (USDA) standards have been documented at Superior’s Denver facility since 2019.
“I think people are just feeling like [there’s been] such a failure of federal and state officials to do something,” Frerick said. “So, they’re now trying to least do something locally.” Berkeley, California, will consider a slaughterhouse ban in this year’s election. Further north in California, the elimination of concentrated animal feed operations (CAFOs) is also on Sonoma County’s ballot.
To Pro-Animal Future, the group behind Denver’s initiative, Initiated Ordinance 309 is a pilot—the first step in a plan to scale to bigger cities and subsectors of industrial farming. Sheep production in the United States makes up less than 1 percent of the nation’s livestock industry. Unlike chicken or beef, lamb is a higher-end product, popular mostly for special occasions and among Middle Eastern, Caribbean, and African customers. Others may not even notice lamb’s disappearance from supermarket shelves.
Denver also offers an ideal laboratory for testing initiatives: Only about 9,000 signatures are needed to get a citizen-initiated measure on the ballot here. Compare that to say, Portland, Oregon, where over 40,000 signatures are required, and Denver—even with its longstanding reputation as a “cowtown” that hosts the annual National Western Stock Show—looks appealing to activists.
Pre-seasoned lamb steaks prepared by Superior Farms in Denver, Colorado, which are sold at Walmarts across the U.S. (Photo credit: Raksha Vasudevan)
The livestock industry argues the targeted closure of Superior, which processes up to 20 percent of U.S. lambs, would only scramble the sheep supply chain and create higher prices for consumers. They also claim it would ruin the livelihoods of Superior’s employees, many of whom live in Globeville, a primarily immigrant, low-income neighborhood.
Polling conducted by Superior earlier this year showed that voters were evenly split on the issue, but in September, the Denver Democrats’ Central Committee officially opposed the initiative, citing the loss of good jobs and associated benefits. With liberal voters in the city likely to follow the party’s lead, the ban’s chances of passing appeared slim in early fall, especially considering that Pro-Animal Future had only raised about $244,000 for their campaign by the end of September.
Meanwhile, “Stop the Ban,” a coalition of livestock industry associations, local restaurants, and labor unions that oppose the measure, has amassed over $1.6 million from donors such as the Meat Institute, the American Sheep Industry Association, the Colorado Livestock Association, the National Pork Producers Council, the National Milk Producers Federation, the National Cattlemen’s Beef Association, and Iowa Pork Producers.
“We take Pro Animal Future at their word when they say this is just the first step in their campaign to eventually ban meat,” said Ian Silverii, founder of the Bighorn Company, which handles Stop the Ban’s public relations. “We’re intent on stopping them now.”
Animal rights activists, meanwhile, continue to vie for voters. In early October, Direct Action Everywhere, a network of animal rights activists, released undercover footage captured inside Superior this summer. Video footage shows what activists call potential legal and ethical violations: one lamb that appears to be conscious after slaughter; another with a prolapsed uterus, untreated and headed to slaughter; and workers laughing, spanking animals, and simulating sex acts with machinery on the slaughter line.
“It’s clear that Superior Farms is engaging in not only animal cruelty as prohibited by state law but also in violation of the federal Humane Methods Of Slaughter Act,” Chris Carraway, an animal rights specialist at the University of Denver’s Sturm College of Law, told media following the release of the footage.
Superior disagrees. “Nothing included in the footage we have seen is evidence of extreme violence, animal cruelty, or halal violations,” Mariano told Civil Eats. “This is yet another example of proponents of the slaughterhouse ban misunderstanding or misrepresenting standard, legally compliant parts of the slaughter process in an attempt to shock voters and influence an election.”
Denver’s voters will now decide if they want such slaughter—legal or not—happening in their city.
Tradeoffs of Work at Superior
At the Superior plant in late August, Keyri Reyes, 28, was shivering in a puffer jacket inside Superior. The killing room was not in operation that day, but on a fast-moving assembly line, dozens of Black and brown workers carved large hunks of meat into chops, spareribs, and other cuts. Reyes, towards the end of the line, barely finished garnishing the lamb steaks with sprigs of rosemary and garlic and squeezing them into plastic packets before the next round barreled toward her. The pre-seasoned cuts would soon be sold at Walmarts across the country.
Despite moving quickly, Reyes was cold: The factory floor resembles a refrigerator, a far cry from the balmy air of her native Honduras. “Poverty obligates one to leave one’s country,” she told Civil Eats. Reyes has dark, lively eyes and hands that gesture animatedly as she talks. But she hasn’t necessarily escaped poverty here, earning $19.30/hour—just a dollar above Denver’s minimum wage. Denver regularly ranks among the country’s most expensive cities to live, and even with this comparatively high wage, Reyes must share a rented house with six other people.
“There’s a lot of folks that maybe that’s one of the first jobs they’re able to get when they move to the community.”
To offset the relatively low pay, Superior offers an employee stock ownership program (ESOP), which it touts as a rare perk in meatpacking. Frank Sabedra, who’s worked in maintenance at Superior since 2022, says the ESOP, along with the company’s 401K match and the camaraderie within his team make Superior a far better place to work than his previous employers, Amazon and FedEx. “I plan on working here for the rest of my life,” he said.
Currently, less than a third of its Denver employees are currently vested in the ESOP (employees become eligible after three years), according to Mariano. Reyes, who’s been at Superior since 2021, doesn’t know if she is or will ever become an employee owner. Part of her confusion stems from being hired through an agency: She only became a direct employee of Superior two years ago. Either way, with limited English, a seven-year-old, and a mother to support, her options are limited.
Reyes’ situation is not unusual among Superior’s employees. “They have employed folks that have trouble finding work in other places,” said Nola Miguel, director of the Globeville Elyria Swansea (GES) Coalition, which works to improve affordable housing and health equity in the community. “There’s a lot of folks that maybe that’s one of the first jobs they’re able to get when they move to the community.”
If the ban passes, Austin Frerick fears pushing out a smaller, independent player like Superior from an already consolidated industry might result in less competition for workers—and even lower wages. He also wonders if it might simply displace the problems associated with industrial farming to another location: likely a more rural town, with less oversight than a large, liberal city. But Pro-Animal Future contends that Superior is not following the rules as it is.
According to records acquired by Civil Eats through a Freedom of Information Act request, over 600 instances of non-compliance with U.S. Department of Agriculture (USDA) standards have been documented at Superior’s Denver facility since 2019. Inspectors observed cuts labeled as halal even when not prepared according to halal practices, and products backdated by over a week.
Other violations included fecal contamination on carcasses, inadequate ventilation, and flies spotted in various parts of the facility—all of which threaten to spread bacteria like E. coli and Salmonella. (Superior points out its compliance rate with USDA regulations is 98.31 percent, which is nearly on par with the 2024 industry average of 98.9 percent.)
OSHA has also documented multiple accidents and safety violations at Superior, including amputation of a thumb in 2022. Adan Hernandez, who worked at Superior from 2006 to 2021, told Civil Eats that he was often forced to do multiple jobs when the line was short-staffed. “Sometimes I was ripping limbs off and also opening the throat of sheep,” he said. “These are things that one has to pay attention to.” With workers at slaughterhouses already cutting at speeds that experts call “dangerously fast,” doubling his tasks felt like asking for an accident.
Last month, the U.S. Environmental Protection Agency (EPA) fined Superior $119,200 for violating chemical safety standards, forventilation, labeling, and ammonia detectors. Hernandez said ammonia leaks were common at the plant, as was clogged drainage that led to interior flooding. “The water would get up to the knees,” he said. “The [animals’] excrements were floating, blood, everything.”
We’ll bring the news to you.
Get the weekly Civil Eats newsletter, delivered to your inbox.
Sign up today
Sign up today
Superior acknowledges that “just like a home–sometimes we have to deal with a clogged drain.” They emphasize that they have a valid sewer permit, that chemical leaks did not expose workers to chemicals, and that they chose to participate in a Supplemental Environmental Project (SEP) with the EPA that surpasses required standards to prevent ammonia releases.
Mariano also noted that Superior’s employee-owners “take their own safety very seriously and take appropriate precautions against the various risks inherent to any kind of industrial work. They also ensure strong health benefits to provide care and treatment for employee-owners in the rare instances when workplace injuries occur.”
They note that OSHA has only recorded three accidents at Superior in the past decade—but companies are not required to report minor injuries to OSHA, meaning injuries treated with first aid, or that employees choose to seek treatment for on their own, could be missing from this record. When Hernandez got cut on the leg at work, he ended up paying for his own treatment; he said the clinic that Superior sent workers to was slow. He ended up with a hematoma and six stitches.
What the Neighbors Want
A metal scrapyard, a shuttered warehouse with cracked windows, and modular homes border Superior’s facility in Denver. Typically, the meatpacking industry locates its facilities in rural and low-income areas, entrenching their poverty and degrading their natural environments. Globeville, home to more than a dozen meatpacking plants in the early 1900s, is now one of the country’s most polluted zip codes. Locals complain of noxious odors from the Purina plant and an oil refinery, car exhaust from two major highways, and the “killing smell” that wafts from Superior.
Behind the facility snakes the South Platte River, where Superior discharges its stormwater. According to the Colorado Department of Public Health & Environment, Superior has violated the Clean Water Act since at least 2018 by failing to report monitoring of pollutants in its discharge. Available data shows the facility exceeded benchmarks for solid effluents by almost 800 percent earlier this summer.
Superior claims the solid effluent reading was erroneous, and that the Water Quality Control Division of the State of Colorado has awarded them a “No Exposure Certification,” meaning their infrastructure is sound enough to prevent any accidental pollution of the South Platte River.
Three out of four slaughterhouses that discharge pollution directly into rivers and streams, meanwhile, are within one mile of low-income or BIPOC communities, according to the EPA. Air and water pollution from slaughterhouses can also contribute to headaches, breathing difficulties, and nose, eye, and throat irritation—all common complaints in Globeville, where locals are hospitalized for asthma-related conditions 63 percent more often than the state average.
Though one study by the Common Sense Institute, a conservative think tank, predictsSuperior’s closure would actually increase emissions from the construction of a new slaughterhouse and longer trucking routes, experts largely agree that transport accounts for a tiny proportion of meat’s emissions. They also point out that a new facility would likely be more efficient than a 70-year-old slaughterhouse, and therefore generate fewer emissions. Shutting down Superior, then, might not impact overall greenhouse gas emissions from industrial farming—but it would likely improve air and water quality in Globeville.
It might also lead to land in Globeville becoming more sought after. With its proximity to downtown and the hyper-gentrified River North Arts District, luxury apartments have recently sprung up in the area. Property taxes have also skyrocketed in Globeville, threatening to displace long-time residents.
Pro Animal Future points to Blueprint Denver, a land use plan that designates Superior’s parcel as a mixed-use community center. If the ban passes, they claim the property could be converted to something more “community friendly,” like a park or recreation center. But a city spokesperson said the owners will ultimately decide what redevelopment, if any, happens.
Nola Miguel, at the Globeville Elyria Swansea Coalition, wants to see the land turned into affordable housing or another employer for her working-class neighbors. But she knows there’s no guaranteeing that under the ballot initiative.
“I don’t think it’s been fully vetted and processed, or that the community has even been asked about it, other than very few meetings,” she said. “This is typical of how policy happens in GES. It’s not formed with the neighborhood.”
A Future Without a Slaughterhouse
In Greeley, 65 miles northeast of Denver, loom the industrial giants of Colorado factory farming: JBS, Cactus Hill Ranch, and Double J Lamb Feeders. Superior confirms that most of its lambs come from these “feeders,” industrial operations that pack thousands of animals into outdoor pens. Such large-scale outfits make up the majority of Colorado’s sheep production.
A JBS Processing Plant in Greeley, Colorado. (Photo credit: Chet Strange/Getty Images)
“When you’re that big, when you’re doing 20,000 sheep, you have access to capital,” said Frerick. Meaning: The closure of a single slaughterhouse is unlikely to put these corporate giants out of business.
Aaron Smith, the Gordon Rausser Distinguished Chair and Professor of Agricultural and Resource Economics at U.C. Berkeley, also doubts the sheep industry as a whole will suffer if the ban passes. Total lamb consumption in the U.S. is unlikely to change, he said, but processing might shift to other places. Recent history reinforces this: In 2020, Greeley’s Mountain States Rosen plant, America’s largest lamb processing facility at the time, went bankrupt. Despite a short-term disruption, new facilities in Brush, Colorado, and San Angelo, Texas, swiftly helped absorb the demand.
Thank you for being a loyal reader.
We rely on you. Become a member today to support our award-winning work.
Become a member
Become a member
However, Nick Maneotis, a third-generation rancher in Craig, Colorado, worries that Superior’s disappearance might spell the end of his family’s mid-size operation. Maneotis, 53, and his father, 78, raise about 4,000 lambs a year, all of which end up at Superior either directly or through feeders.
“There’s really nowhere else to go with them,” he said. “Colorado Lamb Processors in Brush only do whole carcasses, so that they don’t cut down to individual cuts to supply to restaurants.” He suspects restaurants will replace Superior’s cuts with imported meat from Australia and New Zealand, which already make up over 60 percent of lamb consumed in the U.S.
A recent Colorado State University study tried to quantify these industry-wide impacts, predicting up to 2,700 job losses from ranching to animal feed to trucking. But other experts criticize this study as overly pessimistic. Smith, for one, believes that Colorado’s robust job market, with 1.5 openings per unemployed person, can absorb most affected workers in the industry.
The ballot initiative also stipulates that the city prioritize Superior’s workers in “workforce training or employment assistance programs, including those provisioned by the Climate Protection Fund.” In 2023, this fund supported training and placement in “green jobs” like solar installation, urban forestry, and facility and water quality management. But some Superior employees object to outsiders dictating what jobs they should do.
With a sigh, Reyes, still in her puffer jacket, said would consider a “green job.” “If there’s no other option, then there’s no other option,” she said. For years, her life had been narrowed by circumstances outside her control. This would just be one more constriction.
But she has a plan.
“More than anything, I want to build my house in Honduras,” she said. In four years, Reyes hopes to have saved enough money to build a home next to her mom’s house in El Rosario and open a little grocery store, a pulpería. She’ll be not just an employee, but an owner—this time, for sure.
This article was updated to correct Aaron Smith’s title at UC Berkeley.
You’d be a great Civil Eats member…
Civil Eats is a reader-supported, nonprofit newsroom, and we count on our members to keep producing our award-winning work.
Readers like you are the reason why we’re able to keep digging deep into stories you won’t find anywhere else. When you become a member, your support directly funds our journalism—from paying our reporters to keeping the internet on in our remote offices across the United States.
Your membership will also come with great benefits, including our award-winning newsletter, The Deep Dish, which is full of relevant and timely reporting, access to our members’ Slack community, and online salons as a way to engage with reporters, food and agriculture experts, and each other.
Civil Eats Supporting Membership $60/year $6/month
Give One, Get One Membership $100/year
Learn more about our membership program
Raksha Vasudevan is an independent journalist based in Denver. Her reporting on environmental justice and housing appears in VICE, The Guardian, Outside, and High Country News. Read more >
Like the story?
Join the conversation.
Leave a Comment
This site uses Akismet to reduce spam. Learn how your comment data is processed.
Read more about
- Animal Ag
- Food Justice
- Food Safety
- General
Related
More from
General
If Restaurants Serve Up Climate Education, Will Diners Pay Attention?
By Jaya Saxena
October 21, 2024
Can the Government Help Americans Waste LessFood?
By Lisa Held
October 16, 2024
‘Invisible’ Waste: For Restaurants, Composting Food Scraps Is Just the Beginning
By Meg Wilcox
October 15, 2024
For Contract Farmers, the Election Could Change Everything—or Nothing atAll
By Lisa Held
October 8, 2024
Featured
By Lisa Held
October 22, 2024
In this week’s Field Report, what you need to know about the shift away from glyphosate in Roundup’s garden weedkillers, the Harris-Walz plan for rural America, and more.
Report Casts Doubt on Safety of New RoundupProducts
By Lisa Held
October 22, 2024
If Restaurants Serve Up Climate Education, Will Diners Pay Attention?
By Jaya Saxena
October 21, 2024
How to Help Farmworkers Impacted by HurricaneHelene
By Christina Cooke
October 17, 2024
Can the Government Help Americans Waste LessFood?
By Lisa Held
October 16, 2024
Popular
Can Trump and Robert F. Kennedy, Jr. ‘Make America Healthy Again’?
By Lisa Held
October 9, 2024
Battling Meltdown: If You Can’t Stand the Heat, Work for Change in theKitchen
By Amy McCarthy
October 7, 2024
Immigrant Workers Are the Backbone of Our FoodSystem
By The Civil Eats Editors
October 2, 2024
Good Goats Make Good Neighbors
By Carmen Kohlruss
October 2, 2024
'; userWithoutSessionInfo.classList.add('wk-user-update-info'); userWithoutSessionInfo.insertAdjacentHTML('beforeend', infoBlock); authForm.parentNode.insertBefore(userWithoutSessionInfo, authForm); authForm.style.display = 'none'; document.addEventListener('click', hideUserWithoutSessionInfo); } signInSubmitSpinner.style.display = 'none'; return true; }); window.wk.events.subscribe("success-auth", function ({register}) { let userWithoutSessionInfo = document.querySelector('.wk-user-update-info'); if(userWithoutSessionInfo) { hideUserWithoutSessionText(); } if (register) { subscribeSignUpNewsletters(); const extra_groups = []; /** Location data */ extra_groups.push({ group_key: "signup-info", field_key: "signup-location", field_value: window.location.href }); /** UTM data */ let utm_data = getUTMdata(); if (utm_data.length>0) { utm_data.forEach(item => { extra_groups.push({ group_key: "signup-info", field_key: item[0], field_value: item[1] }); }) } /** saving data: */ window.wk.sdk.methods.client.put({ path: '/user/extra/data', data: { extra_groups: extra_groups } }).catch(error => { console.log(error.response.error, 'error'); }); } }); async function subscribeSignUpNewsletters() { let tags = { 598: true } await window.wk.sdk.methods.client.put({ path: '/integrations/activecampaign/user/tags', data: { tags: tags } }).then(function (response) { console.log('SUBSCRIPTION SUCCESS', response); }).catch(function () { console.log('SUBSCRIPTION ERROR'); }); } function getUTMdata() { let query = window.location.search.substring(1); let vars = query.split('&'); let utm_data = []; for (let i = 0; i < vars.length; i++) { let pair = vars[i].split('='); pair.forEach((item, index) => { try { pair[index] = decodeURIComponent(item); } catch (e) { } }); if (pair[0] === 'utm' || pair[0].startsWith('utm_')) { utm_data.push(pair); } } return utm_data; } window.wk.events.subscribe('wk-event-checkout-success', function (value) { const extra_groups = []; /** Location data */ extra_groups.push({ group_key: "payment-info", field_key: "payment-location", field_value: window.location.href }); /** UTM data */ let utm_data = getUTMdata(); if (utm_data.length>0) { utm_data.forEach(item => { extra_groups.push({ group_key: "payment-info", field_key: item[0], field_value: item[1] }); }) } /** saving data: */ window.wk.sdk.methods.client.put({ path: '/user/extra/data', data: { extra_groups: extra_groups } }).catch(error => { console.log(error.response.error, 'error'); }); }); } }); function hideUserWithoutSessionInfo(e) { switch(e.target.id) { case 'auth-signup-link': case 'auth-modal-close-btn': case 'auth-modal-wrapper': case 'auth-password-link': hideUserWithoutSessionText(); break; } if(e.target.classList.contains('wk-form-button')) { hideUserWithoutSessionText(); } } function hideUserWithoutSessionText() { let userWithoutSessionInfo = document.querySelector('.wk-user-update-info'); let authForm = document.querySelector('#wk-email-auth-form'); document.removeEventListener('click', hideUserWithoutSessionInfo); userWithoutSessionInfo.remove(); authForm.style.display = 'block'; let authFormHeaderError = document.querySelector('#wk-email-auth-form .wk-form .wk-form-header .wk-form__error'); if(authFormHeaderError) { authFormHeaderError.style.display = ''; } } function wkSignInButtonModify() { let menuSignInButtons = document.querySelectorAll('.wkwp-user-my-account-button'); if (menuSignInButtons.length > 0) { menuSignInButtons.forEach(element => { element.classList.remove('wkwp-user-my-account-button', 'wk-call', 'wk–sign-in'); element.classList.add('custom-wkwp-user-my-account-button'); }); } document.addEventListener('click', (e) => { if (e.target.classList.contains('wallkit-sign-in-cta') || e.target.classList.contains('custom-wkwp-user-my-account-button')) { e.preventDefault(); if (typeof window.wk.authentication !== 'undefined' && window.wk.authentication.isAuthenticated()) { // user authenticated } else { window.wk.authentication.show('sign-in'); } } }); } function wkShowUserStatus() { let wkSettings = window["wallkitSettings"] || {}; let wkCallClass = wkSettings.integration.call.classForHandleClick || 'wk-call'; let wkTranslations = window["wallkitTranslations"] || {}; const accountStatusSpanEls = document.querySelectorAll('.custom-wkwp-user-my-account-button'); if (!accountStatusSpanEls.length) { return; } if (window.wk.authentication.isAuthenticated()) { if (accountStatusSpanEls.length > 0) { accountStatusSpanEls.forEach(element => { element.innerHTML = wkTranslations.my_account || 'MyAccount'; element.classList.add(wkCallClass, 'wk–account-settings'); element.style.display = 'block'; }); } } else { if (accountStatusSpanEls.length > 0) { accountStatusSpanEls.forEach(element => { element.classList.remove(wkCallClass, 'wk–account-settings'); element.innerHTML = wkTranslations.sign_in || 'Signin'; element.style.display = 'block'; }); } } let topSignIn = document.querySelector('header nav .wrapper-menu-buttons .custom-wkwp-user-my-account-button'); if(topSignIn) { topSignIn.style.display = 'inline-block'; } } async function setWisepopsArgs() { if (window.wk.authentication.isAuthenticated()) { if (!window.wk.sdk.methods.user.email) { await window.wk.sdk.methods.client.get({ path: '/user' }) .then((responce) => { if (responce.id > 0 && responce.id === window.wk.sdk.methods.user.id) { window.wk.sdk.methods.user = responce; } }, (error) => { console.log('ERROR:', error); }); } wisepops("properties", { firstName: window.wk.sdk.methods.user.first_name, lastName: window.wk.sdk.methods.user.last_name, authentication: true, plan: window.wk.sdk.methods.user.subscriptions[0].plan.title, priceTier: window.wk.sdk.methods.user.subscriptions[0].title }); } } function wkCheckPostAccess() { if (typeof window.wallkitPostData.config !== "undefined" && typeof window.wallkitPostData.data.type !== "undefined" && window.wallkitPostData.data.type === 'post' && typeof window.wallkitPostData.data !== "undefined" && typeof window.wallkitPostData.data.id !== "undefined" && window.wallkitPostData.data.id !== '' ) { const postInfo = window.wallkitPostData.data; const wkPost = new window.wk.content(postInfo); const postContentWrapper = document.querySelectorAll(".wrapper-content-story .row > *"); let topElement = document.querySelector("#pico .wrapper-content"); let paragraphs = topElement.querySelectorAll('.wrapper-content-story .post-single-left p'); // let wkContentAfterEls = document.querySelectorAll(".wrapper-content-story .row .post-single-left .post-simple"); if (!topElement || !paragraphs.length) { return; } wkPost.checkAccess().then((response) => { if (!response.allowed) { let showParagraphs = paragraphs.length > 2 ? 2 : paragraphs.length - 1; var paragraphsHTML = ''; for (var i = 0; i <= showParagraphs; i++) { paragraphsHTML += `
` + paragraphs[i].innerHTML + `
`; } showWKPaywall(topElement, paragraphsHTML); if (postContentWrapper.length) { postContentWrapper.forEach((e) => { if (!e.classList.contains('sidebar-right')) { e.classList.add('wk-content-paywall'); } }); } let paywallBlockLoginLink = document.querySelector('.wallkit-paywall-block__login_plans'); if (paywallBlockLoginLink) { if (window.wk.authentication.isAuthenticated()) { paywallBlockLoginLink.style = "display:none;"; } else { paywallBlockLoginLink.style = "display:block;"; } } } else { if (postContentWrapper.length) { postContentWrapper.forEach((e) => { if (!e.classList.contains('sidebar-right')) { e.classList.remove('wk-content-paywall'); } }); } let wkPaywallBlock = document.querySelector(".wkwp-paywall-block-wrapper"); if (wkPaywallBlock) { wkPaywallBlock.parentNode.removeChild(wkPaywallBlock); } } if (postContentWrapper) { postContentWrapper.forEach((e) => { if (!e.classList.contains('sidebar-right')) { e.classList.add('wk-content-active'); } }); } }).catch((error) => { console.log('!! wkPost ERROR', error); }); } } function showWKPaywall(contentNode, paragraphsHTML) { let wkSettings = window["wallkitSettings"] || {}; let paywallBlockContent = document.querySelector(".wkwp-paywall-block-wrapper"); if (!paywallBlockContent) { paywallBlockContent = document.createElement('div'); paywallBlockContent.classList.add('wkwp-paywall-block-wrapper', 'wrapper-content', 'wrapper-content-story'); paywallBlockContent.insertAdjacentHTML('beforeend', `
${paragraphsHTML} ${wkSettings.config.paywall.content}
`); contentNode.parentNode.insertBefore(paywallBlockContent, contentNode); } }})();var bl_wkuser = window.Wallkit.user;var wisepopsProperties = {};if (bl_wkuser) { wisepopsProperties = { WKemail: bl_wkuser.email, WKactive: bl_wkuser.active, WKFirstName: bl_wkuser.first_name, WKLastName: bl_wkuser.last_name, WKSubscription: bl_wkuser.subscriptions.length };}wisepops("properties", wisepopsProperties);