The mechanism of age related decreases in serum testosterone levels has also been the subject of investigation. Metabolic clearance declines with age but this effect is less pronounced than a reduction in testosterone production, so the overall effect is to reduce serum testosterone levels. Gonadotrophin levels rise during aging (Feldman et al 2002) and testicular secretory responses to recombinant human chorionic gonadotrophin (hCG) are reduced (Mulligan et al 1999, 2001). This implies that the reduced production may be caused by primary testicular failure but in fact these changes are not adequate to fully explain the fall in testosterone levels. There are changes in the lutenising hormone (LH) production which consist of decreased LH pulse frequency and amplitude, (Veldhuis et al 1992; Pincus et al 1997) although pituitary production of LH in response to pharmacological stimulation with exogenous GnRH analogues is preserved (Mulligan et al 1999). It therefore seems likely that there are changes in endogenous production of GnRH which underlie the changes in LH secretion and have a role in the age related decline in testosterone. Thus the decreases in testosterone levels with aging seem to reflect changes at all levels of the hypothalamic-pituitary-testicular axis. With advancing age there is also a reduction in androgen receptor concentration in some target tissues and this may contribute to the clinical syndrome of LOH (Ono et al 1988; Gallon et al 1989).

As already indicated previously, testosterone levels, particularly bioavailable testosterone, fall with advancing age. This decline in testosterone availability may start to occur early in the forth decade but it usually becomes clinically manifest in the 50s and 60s. Although there is continuing debate about the best way to diagnose hypogonadism in the aging male, there appears to be a general consensus that symptomatic men with reduced levels of testosterone should be given a trial of testosterone therapy if there is no contraindication to do so (Bain et al 2007).
A number of epidemiological studies have found that bone mineral density in the aging male population is positively associated with endogenous androgen levels (Murphy et al 1993; Ongphiphadhanakul et al 1995; Rucker et al 2004). Testosterone levels in young men have been shown to correlate with bone size, indicating a role in determination of peak bone mass and protection from future osteoporosis (Lorentzon et al 2005). Male hypogonadism has been shown to be a risk factor for hip fracture (Jackson et al 1992) and a recent study showed a high prevalence of hypogonadism in a group of male patients with average age 75 years presenting with minimal trauma fractures compared to stroke victims who acted as controls (Leifke et al 2005). Estrogen is a well known determinant of bone density in women and some investigators have found serum estrogen to be a strong determinant of male bone density (Khosla et al 1998; Khosla et al 2001). Serum estrogen was also found to correlate better than testosterone with peak bone mass (Khosla et al 2001) but this is in contradiction of a more recent study showing a negative correlation of estrogen with peak bone size (Lorentzon et al 2005). Men with aromatase deficiency (Carani et al 1997) or defunctioning estrogen receptor mutations (Smith et al 1994) have been found to have abnormally low bone density despite normal or high testosterone levels which further emphasizes the important influence of estrogen on male bone density.
Looking for ingredients that work in the realm of supplements can be like finding a needle in a haystack. Testosterone boosters, like all dietary supplements, are not approved by the Food and Drug Administration prior to marketing. This lack of oversight dates back to the 1994 Dietary Supplement Health and Education Act (DSHEA), which stipulated that purveyors of supplements weren’t required to prove the safety of their products or the veracity of what’s on the labels to the FDA before listing them for sale. Often, there isn’t a lot of scientific backing behind an ingredient, or research has been done solely on animals, not humans.
The final two studies looked directly at soy vs testosterone levels. The first looked at introducing consumption of soya flour on testosterone levels. They found that those who ate the Soy flour lowered their T levels during the study (43). And the second study looked at the consumption of soy protein isolates (powder) in healthy men. They found that testosterone levels decreased upon consumption of soy powder (45).

Now that we know chronic insulin spikes lead to lower Testosterone production, I hope I haven’t sent you running into the low carb camp! There are a few studies out there showing that long term low carb or ketogenic dieting leads to higher cortisol levels (especially with subjects who are training), and decreased testosterone levels (28 & 29). I have used low carb diets in the past with successful results (winning a national bodybuilding title), however the key is to use cyclical carb re-feeds. If you’re going to go on a low carb diet for whatever reason, be sure to work in a large carb reefed once a week.
Examine.com does not assume liability for any actions undertaken after visiting these pages, and does not assume liability if one misuses supplements. Examine.com and its Editors do not ensure that unforeseen side effects will not occur even at the proper dosages, and thereby does not assume liability for any side effects from supplements or practices hosted under the domain of Examine.com.
These results have been echoed in clinical trials. A meta-analysis of 24 RCTs looked at weight loss caused by diet or bariatric surgery:[22] In the diet studies, the average 9.8% weight loss was linked to a testosterone increase of 2.9 nmol/L (84 ng/dL). In the bariatric-surgery studies, the average 32% weight loss was linked to a testosterone increase of 8.7 nmol/L (251 ng/dL).
Testosterone is an essential hormone for men, and a decline in the levels can occur due to many reasons, but these natural supplements are great. They are safe to use and don’t have any side effects, that’s why you can take these supplements without doctor consultations. But if you have any other health issues, then consult a doctor before taking them.
"The Journal of Clinical Endocrinology and Metabolism" published that males who switched from a high-fat diet to a low-fat diet also saw a decrease in their testosterone levels. If you want to put some fat back into your diet without fearing cardiac implications, plant-based saturated fat like coconut is just the ticket. Meat-based fat is also acceptable if kept to less than 10% of your dietary fat intake.

If you're a man who's experiencing symptoms such as decreased sex drive, erectile dysfunction, depressed mood, and difficulties with concentration and memory, and you think low testosterone may be to blame, you can have your levels tested. Since testosterone levels fluctuate throughout the day, you'll probably need more than a blood test to get a true picture of your levels.
That said, magnesium is one of a few ingredients demonstrated to impact testosterone levels. Researchers at Italy’s University of Palermo found that magnesium improved participants’ anabolic hormone status — including their testosterone levels. In a follow-up study, they confirm that even adjusting for age differences in their participant group, “magnesium was positively associated with total testosterone.” They propose that magnesium supplementation might help improve muscle performance in aging men — a group particularly vulnerable to declining/low testosterone levels. Outside of Italy, researchers at Turkey’s Selçuk University found that magnesium supplementation increased testosterone levels for both athletes and more sedentary men alike.

The testosterone booster pills are effective from 4 to 8 hours. To maintain testosterone levels high during the whole day, you need a multiple daily dosing regimen. 2-times daily dosing still not always can improve hormone production to the greatest extent. 3-4-times daily dosing is the best solution to make your body normalize testosterone synthesis and prevent it from decreasing before you take another pill. Don’t forget that the regularity of daily supplement intake is crucial if you really aspire to give a boost to hormone production.
That said, magnesium is one of a few ingredients demonstrated to impact testosterone levels. Researchers at Italy’s University of Palermo found that magnesium improved participants’ anabolic hormone status — including their testosterone levels. In a follow-up study, they confirm that even adjusting for age differences in their participant group, “magnesium was positively associated with total testosterone.” They propose that magnesium supplementation might help improve muscle performance in aging men — a group particularly vulnerable to declining/low testosterone levels. Outside of Italy, researchers at Turkey’s Selçuk University found that magnesium supplementation increased testosterone levels for both athletes and more sedentary men alike.
Mínguez-Alarcón, L., Chavarro, J. E., Mendiola, J., Roca, M., Tanrikut, C., Vioque, J., ... Torres-Cantero, A. M. (2017, March–April). Fatty acid intake in relation to reproductive hormones and testicular volume among young healthy men [Abstract]. Asian Journal of Andrology, 19(2), 184–190. Retrieved from https://www.ncbi.nlm.nih.gov/pubmed/27834316

We should probably start with the elephant in the room: do these supplements increase testosterone? The answer is probably yes. There are some ingredients that help convince your body to produce more testosterone, but there’s a catch. Testosterone boosters aren’t actually great at boosting; that is, at pushing your testosterone levels above your healthy, normal balance. Boosters typically act more like restorers — helping bring low testosterone levels back to that healthy equilibrium rather than boosting you above normal testosterone levels. Just like how if you have anemia, taking a vitamin B12 supplement can help restore your energy and reduce fatigue, but if your B12 levels are good, a supplement won’t give you super energy levels to stay awake for three days — your body will likely just process (read: pee) out the extra.
Overall, few patients have a compelling contraindication to testosterone treatment. The majority of men with late onset hypogonadism can be safely treated with testosterone but all will require monitoring of prostate parameters HDL cholesterol, hematocrit and psychological state. It is also wise to monitor symptoms of sleep apnea. Other specific concerns may be raised by the mode of delivery such as local side effects from transdermal testosterone.
Fenugreek is often found in Indian, Turkish, and Persian cuisine. Multiple studies have found it to improve testosterone levels, and in particular, sexual performance. Scientists at Babu Banarasi Das University and King George’s Medical University in India have found that fenugreek improved testosterone levels. Testosterone levels increased for 90% of the volunteers, sperm morphology (the size and shape of sperm) improved for 14.6%, and more than 50% of volunteers experienced improvements in mental alertness, mood, and libido.

During the second trimester, androgen level is associated with sex formation.[13] This period affects the femininization or masculinization of the fetus and can be a better predictor of feminine or masculine behaviours such as sex typed behaviour than an adult's own levels. A mother's testosterone level during pregnancy is correlated with her daughter's sex-typical behavior as an adult, and the correlation is even stronger than with the daughter's own adult testosterone level.[14]

Everyone knows that carbohydrates are extremely important for testosterone production, but instead of reaching for grains during your next meal, stack your plate high with potatoes. Research reveals that grains have inflammatory properties, but the testosterone-friendly starches in potatoes will have the bodybuilder in your life smiling at dinnertime!


The brain is also affected by this sexual differentiation;[13] the enzyme aromatase converts testosterone into estradiol that is responsible for masculinization of the brain in male mice. In humans, masculinization of the fetal brain appears, by observation of gender preference in patients with congenital diseases of androgen formation or androgen receptor function, to be associated with functional androgen receptors.[95]
A blood test is the only way to diagnose a low testosterone level or a reduction in the bioavailability of testosterone. Some men have a lower than normal testosterone level without signs or symptoms. For most men, no treatment is needed. But for some others, very low testosterone levels lead to a condition in which bones become weak and brittle (osteoporosis). For others, low testosterone might cause changes in sexual function, sleep patterns, emotions and the body.
Anabolic–androgenic steroids (AASs) are synthetic derivatives of testosterone that are commonly used among athletes aged 18–40 years, but many reports have demonstrated the presence of numerous toxic and hormonal effects as a result of long-term use of an AAS.[9] Testosterone-foods act as natural libido boosters. Due to the growing interest in herbal ingredients and other dietary supplements worldwide, the use of testosterone boosters is becoming more and more mainstream among athletes, but several side effects were documented. Hence, this study established to help in the assessment of the side effects and health risks which could occur among athletes consuming testosterone boosters.
Do low levels of testosterone produce symptoms in middle-aged men? Absolutely. In fact, the classic symptoms were first recognized more than 70 years ago when two American physicians, Carl Heller, MD, and Gordon Myers, MD, showed the effectiveness of testosterone treatment for symptoms of fatigue, depression, irritability, low sex drive, erectile dysfunction, night sweats, and hot flashes in men. Over the years, subsequent studies have found that some—but not all—men with low, age-adjusted testosterone levels exhibit symptoms consistent with andropause. All experience improvement with testosterone therapy.
Erectile dysfunction is a common finding in the aging male. A prevalence of over 70% was found in men older than 70 in a recent cross-sectional study (Ponholzer et al 2005). Treatment with phosphodiesterase-5 (PDE-5) inhibitors is proven to be effective for the majority of men but some do not respond (Shabsigh and Anastasiadis 2003). The condition is multi-factorial, with contributions from emotional, vascular, neurological and pharmacological factors. The concept of erectile dysfunction as a vascular disease is particularly interesting in view of the evidence presented above, linking testosterone to atherosclerosis and describing its action as a vasodilator.
However, some of these signs and symptoms can be caused by factors other than low testosterone, including medication side effects, thyroid problems, depression and excessive alcohol use. There are also conditions, such as obstructive sleep apnea, that might affect testosterone levels. Once these conditions are identified and treated, testosterone typically will return to a normal level.
The basis for my thinking that T levels could be boosted by cold baths came from a post I wrote a few years ago on the benefits of cold showers. One benefit I found in my research was that they could increase testosterone levels. I mentioned a 1993 study done by the Thrombosis Research Institute in England that found increased T levels after taking a cold shower. Here’s the thing. I can’t find a link to the original source and I can’t find any other studies that support this claim! So without supporting research, I’m unsure of the effects of cold showers on testosterone.
This is an important herb which has been used as therapeutic for centuries. It helps in improving sexual desires and boosts T levels. It is also useful in erectile dysfunction by raising T levels. People having normal T level don’t get affected by taking Tribulus. With the testosterone boosting qualities of Tribulus, this natural supplement works great for building muscle and gaining strength in the gym.
Men who produce more testosterone are more likely to engage in extramarital sex.[55] Testosterone levels do not rely on physical presence of a partner; testosterone levels of men engaging in same-city and long-distance relationships are similar.[54] Physical presence may be required for women who are in relationships for the testosterone–partner interaction, where same-city partnered women have lower testosterone levels than long-distance partnered women.[59]
Testosterone has several positive effects on sexual function, but its most significant effect is on libido, sexual interest and arousal. Boys going through puberty develop an enhanced interest in sex (thoughts, fantasies, masturbation, intercourse) as a consequence of rising levels of testosterone. Hypogonadal men usually have a significant improvement in libido when TRT is initiated (Wang et al 2000; Morley and Perry 2003).
There is an increased incidence of hypogonadism in men with rheumatoid arthritis. Tengstrand et al (2002) studied hormonal levels in 104 men with rheumatoid arthritis and 99 age-matched healthy men. They divided their subjects into 3 age groups: 30–49, 40–59, 60–69. Mean non-sex hormone binding globulin-bound testosterone (bioavailable testosterone) was lower in men with rheumatoid arthritis for each of the three groups. LH was also found to be lower in the patients with rheumatoid arthritis suggesting a hypothalamic-pituitary cause of the reduced bioavailable testosterone. Of the 104 men with rheumatoid arthritis, 33 had hypogonadism compared to 7 of the 99 healthy controls.
Most Americans today are sleep deprived, which may be a contributing factor to declining testosterone levels in men. See, our body makes nearly all the testosterone it needs for the day while we’re sleeping. That increased level of T that we experience at night is one of the reasons we wake up with “Morning Wood.” (If you don’t have Morning Wood on a consistent basis, you might have low T).
Ok. So this product is meant to be taken continuously and without side-effects. But my question is, will there be replenishment from this product in aiding the body's natural ability to produce testosterone? In other words, will there ever be a time when I can say well I don't have to take this any more as my body is producing testosterone again on it's own and my muscle mass has been enhanced?
Afrisham, R., Sadejh-Nejadi, S., SoliemaniFar, O., Kooti, W., Ashtary-Larky, D., Alamiri, F., … Khaneh-Keshi, A. (2016, November 24). Salivary testosterone levels under psychological stress and its relationship with rumination and five personality traits in medical students. Psychiatry Investigations, 13(6), 637–643. Retrieved from https://www.ncbi.nlm.nih.gov/pmc/articles/PMC5128352/
Sportsmen are permitted to use the boosters to trigger the mechanism of testosterone synthesis in the body. These products won a wide popularity among the sportsmen. The matter is that the supplements work by substantially enhancing sports performance, reviving strength, boosting endurance, coping with excessive stress levels, and decreasing time necessary for recovery after exhausting exercises.
Carbs play a big part in determining your Testosterone levels. Let's start with what to avoid. First, research shows that a large serving of sugar (75g of glucose), decreased Testosterone levels by as much as 25%! (25 & 26). I know this is a pretty extreme dosage, but you may want to avoid massive servings of sugar! Also, men who have Metabolic syndrome have lower Testosterone levels (27). Metabolic syndrome is often brought about by chronic high blood sugar which leads to insulin resistance.
The reasons for considering such therapy become evident from the many associations, indicated above, that reduced testosterone has with a variety of both physiological functions (bone metabolism, muscle mass, cognitive function, libido, erectile function) and pathophysiological states (metabolic syndrome, diabetes mellitus, obesity, insulin resistance, autoimmune disease). Although a definitive long-term, large scale placebo-controlled double-blind study of testosterone therapy in the aging male has not yet been carried out, multiple shorter-term trials have suggested improvement by testosterone with a resultant enhancement of muscle mass, bone density, libido, erectile function, mood, motivation and general sense of well-being.

What are the health benefits of kale? Kale is a leafy green vegetable featured in a variety of meals. With more nutritional value than spinach, kale may help to improve blood glucose, lower the risk of cancer, reduce blood pressure, and prevent asthma. Here, learn about the benefits and risks of consuming kale. We also feature tasty serving suggestions. Read now


The hormone also plays a role in sex drive, sperm production, fat distribution, red cell production, and maintenance of muscle strength and mass, according to the Mayo Clinic. For these reasons, testosterone is associated with overall health and well-being in men. One 2008 study published in the journal Frontiers of Hormone Research even linked testosterone to the prevention of osteoporosis in men.
A large number of side-effects have been attributed to testosterone. In our clinical experience, the incidence of significant adverse effects with treatment producing physiological testosterone levels is low, and many side effects attributed to testosterone are mainly relevant to supraphysiological replacement. Some adverse effects are specific to a given mode of delivery and have already been described. Potential adverse effects concerning the prostate have also been discussed and require appropriate monitoring of symptoms, PSA and digital rectal examination. Other tumors which may be androgen responsive include cancer of the breast and primary liver tumors, and these are both contraindications to testosterone treatment
In compliance with the FTC guidelines, please assume the following about links and posts on this site: Many of the links on DrJockers.com are affiliate links of which I receive a small commission from sales of certain items, but the price is the same for you. If I post an affiliate link to a product, it is something that I personally use, support and would recommend without an affiliate link. Learn More
A blood test is the only way to diagnose a low testosterone level or a reduction in the bioavailability of testosterone. Some men have a lower than normal testosterone level without signs or symptoms. For most men, no treatment is needed. But for some others, very low testosterone levels lead to a condition in which bones become weak and brittle (osteoporosis). For others, low testosterone might cause changes in sexual function, sleep patterns, emotions and the body.
This content is strictly the opinion of Dr. Josh Axe and is for informational and educational purposes only. It is not intended to provide medical advice or to take the place of medical advice or treatment from a personal physician. All readers/viewers of this content are advised to consult their doctors or qualified health professionals regarding specific health questions. Neither Dr. Axe nor the publisher of this content takes responsibility for possible health consequences of any person or persons reading or following the information in this educational content. All viewers of this content, especially those taking prescription or over-the-counter medications, should consult their physicians before beginning any nutrition, supplement or lifestyle program.
Ten healthy men aged around 24 years old spent 1 week sleeping for 8 hours per night at home, they then spent the next 11 nights in a lab. They slept for 10 hours per night for 3 nights, followed by 8 nights of restricted sleep, when they slept for only 5 hours. Doctors checked their blood every 15 to 30 minutes during the last night that they slept 10 hours, as well as on the sleep-restricted session.
Fitness Disclaimer: The information contained in this site is for educational purposes only. Vigorous high-intensity exercise is not safe or suitable for everyone. You should consult a physician before beginning a new diet or exercise program and discontinue exercise immediately and consult your physician if you experience pain, dizziness, or discomfort. The results, if any, from the exercises may vary from person-to-person. Engaging in any exercise or fitness program involves the risk of injury. Mercola.com or our panel of fitness experts shall not be liable for any claims for injuries or damages resulting from or connected with the use of this site. Specific questions about your fitness condition cannot be answered without first establishing a trainer-client relationship.

Once your elevate testosterone levels, you will also sharpen your focus, enhance sports performance, and enjoy enormous competitive spirit. You will also soon notice that the lack of motivation is no longer your problem. Being highly motivated and aggressive due to the action of testosterone boosters, you will experience better muscle gain. Whether you are a novice or a professional sportsman, you will quickly reach your sports goals.
Grape seed extract is another ingredient with not enough research to suggest a dosage. Grape seed extract can interact with drugs like “blood thinners, NSAID painkillers (like aspirin, Advil, and Aleve), certain heart medicines, cancer treatments, and others.” If this sounds like you (or if you ever pop an Advil to clear off a headache), you’ll need to speak with a doctor to make sure this supplement is safe to take.
We start with plastic. A lot of plastic contains bisphenol A (BPA); BPA is a weak synthetic estrogen. Like many other chemicals used in making plastics, BPA is a hormone disruptor and can block or mimic hormones and how they act in the body (34). If you think you’re safe with BPA plastic, think again. Research shows that BPA free plastic has similar estrogen-like effects on the body.
The finding of hypogonadism in diabetic men is not just a scientific curiosity, it may have practical management implications. Kapoor and colleagues (2006) undertook a placebo-controlled double blind study to determine the effect of testosterone therapy on insulin resistance and glycemic control in hypogonadal men with type 2 diabetes. They found that men treated with testosterone had reductions in glycated hemoglobin insulin resistance, fasting blood sugar, waist circumference, waist/hip ratio and total cholesterol.
Intracoronary artery infusion of testosterone causes significant coronary artery dilatation and not constriction as previously thought (Webb et al 1999). When degree of coronary obstruction is assessed by angiography, there is a direct relationship between degree of coronary artery narrowing and reduced testosterone levels (Phillips et al 1994). Men with low testosterone levels have been observed to have: premature atherosclerosis, increased visceral adipose tissue, hyperinsulinemia, and other risk factors for myocardial infarction (Phillips 2005). Insulin resistance has been shown to be associated with a decrease in Leydig cell secretion of testosterone (Pitteloud et al 2005). Muller and colleagues suggest that low endogenous total testosterone and SHBG levels increase the risk of metabolic syndrome in aging and aged men. They demonstrated that low levels of testosterone are related to lower insulin sensitivity and higher fasting insulin levels (Muller et al 2005). These authors speculate that testosterone might play a protective role in the development of metabolic syndrome, insulin resistance, diabetes mellitus and cardiovascular disease in aging men.
Sprinting has been shown numerous times that it has positive effects on testosterone levels. One 2011 study (ref 84) looked at weightlifters who performed 4x35m sprints twice a week. In contrast to the control group (who continued lifting but did not sprint), it was found that “After the 4-week training program, total testosterone and the total testosterone/cortisol ratio increased significantly in the (sprinters) EXP group”.

$(function(){ SocialButtonRound_OnLoad(); }); function OpenPopup(a, b, c, d, e, f) { var g, h, i, j, k, l = ""; if (1 == e) if ("REST" == f.toUpperCase() ? (j = rest_width, k = rest_height) : (j = onet_width, k = onet_height), navigator.userAgent.toUpperCase().indexOf("OPERA") == -1 && navigator.userAgent.toUpperCase().indexOf("MAC") == -1 || (k += 15), document.all) { var m = "no"; d && (m = "yes"), h = 0, i = 0, j = screen.width, k = screen.height; var n = "fullscreen=yes"; g = window.open(a, l, n) } else { j += 20, h = 0, i = 0, j = screen.width, k = screen.height; var n = "fullscreen=yes"; g = window.open(a, l, n) } else if (document.all) { var m = "no"; d && (m = "yes"), h = (screen.width - b) / 2, i = (screen.height - c) / 2; var n = "left=" + h + ",top=" + i + ",width=" + b + ",height=" + c + ",menu=no,address=no,resize=no,scrollbars=" + m + ",titlebar=no,status=no"; g = window.open(a, l, n) } else { b += 20, h = (screen.width - b) / 2, i = (screen.height - c) / 2; var n = "left=" + h + ",top=" + i + ",width=" + b + ",height=" + c + ",menu=no,address=no,resize=no,status=no"; g = window.open(a, l, n) } return g } function SocialButtonRound_OnLoad() { try { addLinksToShareIcon(), generateShareCount(document.location.href), $("ul.social-icons > li > a").not("a.mailtolink").click(function (a) { a.preventDefault(), etafScrollPos = $(document).scrollTop(), window._vis_opt_queue = window._vis_opt_queue || [], window._vis_opt_queue.push(function () { _vis_opt_goal_conversion(243) }); var b = $(this).parent("li").attr("data-social-btn"), c = $(this).attr("href"); switch (b) { case "facebook": OpenPopup(c, 670, 340, !1, 0, ""); break; case "print": window.print(); break; case "chat": break; default: console.log("Unsupported data-social-btn type: " + b) } return !1 }) } catch (a) { } } function addLinksToShareIcon() { var a = window.location, a.indexOf("?") >= 0 && (a = a.substring(0, a.indexOf("?"))); a.indexOf("#") >= 0 && (a = a.substring(0, a.indexOf("#"))); $('ul.social-icons > li[data-social-btn="facebook"] > a').attr("href", "https://www.facebook.com/sharer/sharer.php?u=" + encodeURIComponent(a)); } function generateShareCount(a) { a.indexOf("?") >= 0 && (a = a.substring(0, a.indexOf("?"))); a.indexOf("#") >= 0 && (a = a.substring(0, a.indexOf("#"))); if (a.indexOf("https://") > -1) { var b = encodeURIComponent(a); getFBCount(b) }; } function getFBCount(a) { $.ajax({ url: "https://graph.facebook.com/?fields=share&id=" + a, dataType: "jsonp", success: function (a) { a.share && ($("#shareCountContainer").val(Number($("#shareCountContainer").val()) + Number(a.share.share_count)), addToShareCountAndUpdate()) } }) } function addToShareCountAndUpdate() { if (!isNaN($("#shareCountContainer").val())) { var a = Number($("#shareCountContainer").val()); a >= 1e3 && (a = parseFloat((a / 1e3).toFixed(1)) + "K"), $("span[data-share-counter]").html(a) } }
×