Belle-Ve Bricks

Tailored Creations,
Unforgettable Impressions.

The Coolest LEGO® Sets for Adult Collectors: Unlocking Nostalgia

Trusted by Over 392 Distinctive Clients
Custom model
Bring Your Idea to Life

If you’re of a certain age, the phrase “It’s a LEGO® world” might resonate with you more than it does with the kids of the current digital age. Whether it’s the joy of building your dream castle or recreating your favorite Star Wars scenes, LEGO® bricks have a way of drawing us in and releasing the little kid within.

The iconic, multicolored bricks were our key to unlocking a world of endless possibilities, an invitation to dream and create without boundaries. For those of us who were kids in the 90s and 2000s, LEGO® was more than a toy—it was a part of our growing up.

So it’s not surprising to see many adults today still intrigued by these little bricks. If you’ve ever found yourself perusing the LEGO® aisle as an adult, perhaps you’re part of an expanding community enthusiastically coined as AFOL.

AFOL: More Than Just an Acronym

AFOL, or Adult Fans of Lego, is a term that refers to the community of grown-ups who haven’t lost their passion for the world of interlocking plastic bricks. This group isn’t composed of casual builders but rather serious collectors, creators, and fans that transcend the limitations of age. They prove that LEGO® isn’t just a toy for children but a creative medium that all ages can appreciate and enjoy.

And if you thought this was just a small niche, think again. The AFOL community is a global phenomenon with thousands of members who interact through conventions, social media groups, and websites dedicated to sharing their creations and ideas. So, if you’ve ever felt a bit shy about your LEGO® fascination, kn

The Appeal of LEGO® Sets to Adults

Ah, the sweet allure of LEGO® sets for adults. If you’ve found yourself drawn towards the brick aisle, you’re not alone. There are many reasons why these little colorful blocks have a magnetic pull on us.

1. Nostalgia and Creativity Combined

For many adults, LEGO® sets are a joyous dive back into the past, a time when Saturday mornings were about cartoons and LEGO® building sessions. There’s a rush of nostalgia, almost like hearing the opening chords of your favorite 90s theme song (remember the iconic Fresh Prince of Bel-Air intro?), that accompanies opening a LEGO® box.

But it’s not just nostalgia; there’s also the creative freedom that LEGO® offers. These sets provide a structured challenge with a tangible, satisfying result. Whether you’re crafting the intricate Hogwarts Castle or the colossal LEGO® Star Wars Millennium Falcon, you’re engaging your creativity and problem-solving skills.

2. Tangible Tactile Therapy

Remember when Neo had to choose between the red pill and the blue pill in The Matrix? With LEGO®, you choose your own colored brick and create your world. This active, tactile engagement isn’t just fun—it’s also therapeutic.

Studies show that activities like LEGO® building can contribute to stress relief. They demand focus and immerse us fully, giving us a break from daily worries and pressures. Like a Zen garden for the millennial and Gen-X minds, the process of aligning those bricks and seeing your creation come to life brings a sense of achievement and peace.

So, whether it’s the sweet call of nostalgia, the opportunity to engage your creativity, or the therapeutic value, LEGO® sets pack a serious punch that goes beyond mere play. It’s no wonder the AFOL community is growing stronger and larger each day.

AFOL and Its Community

If the LEGO® realm were a 90s sitcom, the AFOL community would be the friendly, lively Friends’ Central Perk of this universe. From every corner of the globe, AFOLs gather, connect, and share their passion for LEGO®.

1. The AFOL Community: A Global Phenomenon

Like the vast and diverse LEGO® universe, the AFOL community spans continents and cultures. It’s not just a group—it’s a vibrant, thriving society of enthusiasts who breathe life into bricks. They share MOCs (My Own Creation) designs, discuss the latest LEGO® sets, and even organize conventions. Picture Comic-Con, but with more bricks and minifigures.

From forums like Eurobricks to social media groups, and even brick-specific conventions such as the annual Brickworld event, the AFOL community has claimed its space on the global stage.

2. The Rise and Shine of AFOL

Over the years, AFOL’s popularity has seen a significant upswing. Much like Pokémon cards or Tamagotchis in the late 90s and early 2000s, LEGO® collecting has emerged as a popular hobby among adults. But why?

Part of this might be attributed to nostalgia, a potent pull toward the cherished past. Additionally, the diversity and complexity of LEGO® sets available today, catering to varied interests from architecture to space exploration, have kept the community engaged and growing.

3. The AFOL Influencers

Within this expansive community, several influencers have carved out their niche, impacting trends and inspiring fellow AFOLs. Take, for instance, Alice Finch, a renowned LEGO® artist whose intricate recreations of scenes from Harry Potter and Lord of the Rings have won her global recognition.

Then there’s Ryan “MandRproductions” McCullough, a LEGO® YouTuber who has turned his childhood passion into a full-time career. His reviews, news, and opinion pieces are followed by thousands of AFOLs worldwide.

The impact of these and other influencers in the AFOL community is significant. They not only provide inspiration but also contribute to the normalization of adult LEGO® fandom, further strengthening the community’s growth and popularity.

Nostalgia in Pop Culture

The phenomenon of nostalgia is no stranger to pop culture. It’s like the guest star who shows up in your favorite TV series, leaving a lasting impact. But recently, it seems this guest star has been promoted to the main cast.

1. The Return of the Past

Picture this: It’s the mid-2000s, and you’re sprawled out on the living room floor, building your latest LEGO® masterpiece while Friends or Buffy the Vampire Slayer plays in the background. Now, more than a decade later, you’re watching the Friends Reunion or a Buffy reboot while contemplating buying the LEGO® Central Perk set.

This is nostalgia at play. In recent years, throwback trends and a revival of old favorites in pop culture have been resurgent in recent years. From TV show reboots to vintage fashion styles, nostalgia has woven itself into our present-day lives.

2. Nostalgia and Consumer Behavior

Millennials, in particular, are drawn towards this sense of nostalgia. As this generation navigates the complexities of adulthood, they often turn towards familiar and comforting experiences from their childhood.

This nostalgia heavily influences consumer behavior. They’re more likely to buy products that remind them of their past, allowing them to relive their cherished memories. This emotional connection enhances the perceived value of such products, from music vinyls to retro video games and, yes, LEGO® sets.

3. Nostalgia and the Popularity of LEGO® Among Adults

For many adults, LEGO® is synonymous with a happy, carefree childhood. The modern LEGO® sets, with themes ranging from classic sitcoms like Friends to iconic landmarks like the Taj Mahal, capitalize on this nostalgia.

Adults get to relive and share a piece of their past with these sets, hence their growing popularity. It’s not just about building with bricks—it’s about rebuilding memories, one piece at a time.

This fusion of nostalgia and LEGO® is a key ingredient to the expanding adult fandom and the growing influence of the AFOL community.

Millennials and Marketing

In the grand marketing game, millennials have evolved from being mere players to becoming the game masters. This influential generation is reshaping marketing concepts, much like the way they are redefining the workplace, social issues, and even LEGO® building.

The Millennial Impact

Remember the first time you laid your hands on a Gameboy Color or navigated the world of the Internet via dial-up? Millennials do. Growing up in a time of rapid technological advancements and significant cultural shifts, they’ve evolved into a unique consumer group that values authenticity, experiences, and nostalgia.

This transformative generation influences trends and sets the pace in the marketing world. They’ve led the charge for social and environmental responsibility, digitization, and experiential marketing, prompting brands to rethink and reinvent their strategies.

Marketing Strategies That Hit the Millennial Bullseye

Here’s a quick look at successful marketing strategies that have resonated with millennials:

1. Digital and Social Media Marketing

As digital natives, millennials are more likely to discover and engage with brands online. Successful marketing efforts often include a robust digital presence, interactive content, and influencer collaborations.

2. Authenticity and Transparency

Millennials value authenticity. They appreciate brands that are honest, socially responsible, and committed to making a difference.

3. Personalization and Experiences

This generation seeks experiences over mere products. Personalized offerings and engaging, immersive experiences strike a chord with them.

4. Nostalgia Marketing

As we’ve discussed, the tug of nostalgia is strong among millennials, who enjoy revisiting their past.

LEGO®’s Playbook: Millennial Marketing

LEGO® has cleverly tapped into these strategies for its adult-focused sets. With a strong social media presence, engaging digital content, and collaborations with influencers in the AFOL community, LEGO® is acing the digital game.

They’ve kept authenticity at the core, with their dedication to high-quality products, creative expression, and initiatives towards sustainability. LEGO® also offers personalized experiences, from complex adult-focused sets to the LEGO® Ideas platform that invites fans to propose new set ideas.

The crown jewel, however, is their mastery of nostalgia marketing. By releasing sets that echo the popular culture of the 90s and 2000s—from Friends and Harry Potter to Super Mario—LEGO® has ignited a sense of nostalgia, significantly boosting their appeal among adult fans. Through these efforts, LEGO® isn’t just selling sets—it’s delivering memories, experiences, and a piece of cherished nostalgia.

Our Pick for LEGO® Sets for Adults

In the wide universe of LEGO®, navigating your way to the perfect set can feel a bit like Frodo’s journey to Mordor. But fear not! Here’s a curated list of eight LEGO® sets that are sure to appeal to adult collectors, whether you’re a newbie to the block or a seasoned AFOL.

1. LEGO® Captain America’s Shield 76189

Set Number: 76189
Theme: Marvel Super Heroes
Year Released: 2022
No. Pieces: 2,100
RRP: $69.99

Embrace your superhero spirit with this intricate replica of Captain America’s iconic shield. With its brilliant color palette and detailed design, this set offers a satisfying build for fans of the Marvel Universe. Designed for adults, the shield provides a complex build experience that takes the builder through the evolution of one of the most enduring symbols in superhero lore.

2. LEGO® Succulents 10280

Set Number: 10280
Theme: Botanical Collection
Year Released: 2021
No. Pieces: 756
RRP: $49.99

The LEGO® Succulents set introduces a splash of low-maintenance greenery to your space. Perfect for plant lovers or anyone looking to bring a touch of nature to their surroundings, this set combines the joys of gardening with the creativity of LEGO®. The finished models make stunning displays, and the build process is a calming, zen-like experience.

3. LEGO® Eldorado Fortress 6276

Set Number: 6276
Theme: Pirates
Year Released: 1989
No. Pieces: 517
RRP: $87.50 (at release, now retired)

Nostalgia hits like a cannonball with the LEGO® Eldorado Fortress. This set, part of the classic Pirates theme, harks back to the playful conflict between the Imperial Guards and the scurvy sea dogs. With its bold colors and engaging features, the Eldorado Fortress offers a challenging build that will transport you right back to the floor of your 80s or 90s childhood living room.

4. LEGO® Land Rover Classic Defender 90 42110

Set Number: 42110
Theme: Technic
Year Released: 2019
No. Pieces: 2,573
RRP: $199.99

Combining the best of LEGO® and automotive design, the Land Rover Defender set is a dream for car enthusiasts. The detailed model features a host of realistic elements, including a working steering wheel and a four-speed sequential gearbox. Whether you’re an off-road aficionado or simply appreciate good design, this set offers a satisfying building experience.

5. LEGO® Ideas Fender® Stratocaster™ 21329

Set Number: 21329
Theme: Ideas
Year Released: 2022
No. Pieces: 1,079
RRP: $99.99

Rock and roll meets brick and build in the Fender® Stratocaster™ set. Born out of the LEGO® Ideas platform, this model is a tribute to one of the most iconic guitars in music history. Ideal for musicians or music lovers, this set offers a chance to build a piece of musical history, string by string, brick by brick.

6. LEGO® Super Mario 64™ Question Mark Block 71395

Set Number: 71395
Theme: Super Mario
Year Released: 2021
No. Pieces: 2,064
RRP: $169.99

Bursting with nostalgia, the Super Mario 64™ Question Mark Block set invites you to relive the joy of this classic video game. The set cleverly opens to reveal mini versions of iconic levels from the game, providing a complex build that’s filled with Easter eggs. Ideal for gamers and Mario fans alike.

7. LEGO® The Friends Apartments 10292

Set Number: 10292
Theme: Television
Year Released: 2021
No. Pieces: 2,048
RRP: $149.99

For fans of the beloved sitcom, The Friends Apartments set is like stepping into your TV screen. From Joey and Chandler’s foosball table to Monica’s meticulously organized kitchen, the set is packed with references that delight any Friends fan. It’s a chance to recreate your favorite scenes while indulging in some nostalgic building.

8. LEGO® X-Wing Starfighter™ 75301

Set Number: 75301
Theme: Star Wars
Year Released: 2021
No. Pieces: 474
RRP: $49.99

Soar into a galaxy far, far away with the X-Wing Starfighter™ set. A staple of the Star Wars fleet, the X-Wing makes for an engaging build that balances complexity with accessibility. With this set, Star Wars fans can recreate epic space battles or simply display their love for the franchise.

9. LEGO® Ghostbusters™ ECTO-1 10274

Set Number: 10274
Theme: Creator Expert
Year Released: 2020
No. Pieces: 2,352
RRP: $199.99

Who you gonna call? With the Ghostbusters™ ECTO-1 set, you can call upon your building skills to create this iconic car. Packed with authentic features like a ghost tracker and a proton pack, the ECTO-1 is a detailed model that offers a challenging build, perfect for Ghostbusters fans or anyone who appreciates retro cool.

10. LEGO® Daily Bugle 76178

Set Number: 76178
Theme: Marvel Super Heroes
Year Released: 2021
No. Pieces: 3,772
RRP: $299.99

With the Daily Bugle set, you’re not just building a model; you’re creating a scene from a comic book. From battling superheroes and villains to bustling offices, the Daily Bugle is filled with details that will delight any Marvel fan. This set provides a complex, engaging build that will keep any AFOL engrossed for hours.

Tips for Choosing Your First LEGO® Set

So you’re ready to embrace your inner child and dive into the colorful world of LEGO®. It’s a journey filled with creativity, fun, and a tiny bit of foot pain when you accidentally step on a stray brick. But before you take the plunge, here are some tips to help you choose your first LEGO® set.

1. Keep Your Interests in Mind

Your LEGO® set should be a reflection of what you love. Are you a Star Wars fanatic or a die-hard Potterhead? Perhaps you’re an architecture enthusiast or a fan of classic American muscle cars. LEGO® has a broad range of themes, from popular TV shows to historical landmarks, so choose something that resonates with you.

2. Understand the Complexity

Each LEGO® set comes with an age recommendation and a piece count, both of which can indicate its complexity. If you’re a beginner, starting with a 7,500-piece Millennium Falcon might feel more like being dropped into a Sarlacc pit than a fun pastime. Instead, look for sets with fewer pieces or ones that are tagged ‘Easy to Build.’

3. Consider the Display Space

Before you build that life-size LEGO® Death Star, consider where you’re going to display it. Do you have a dedicated LEGO® space, or will your model live on a shelf or desk? Ensuring you have the right amount of space can save you from having to play a real-life game of Tetris in your home.

4. Budget is Key

LEGO® sets can range from pocket-money prices to ‘maybe I should remortgage the house.’ Before you get starry-eyed over the colossal Star Destroyer, take a moment to consider your budget. There’s a LEGO® set out there for every budget, so decide how much you’re willing to invest.

5. Navigate the Marketplace

Whether shopping online or in physical stores, the LEGO® marketplace can be a bit overwhelming. Consider starting with the LEGO® official website, which is easy to navigate and provides detailed information about each set. You can also explore other retailers for deals, but ensure they’re reputable to avoid counterfeit sets.

Remember, choosing your first LEGO® set is part of the fun. It’s the first step in your AFOL journey, so take your time, consider your options, and above all else, enjoy the process. Happy building!

More Info

Navigating the LEGO® landscape can be like navigating a maze at Hogwarts—full of twists, turns, and surprises. To make it a little easier, here are answers to seven common questions about LEGO® collecting, AFOL, and LEGO® sets for adults.

1. What does AFOL stand for?

AFOL stands for ‘Adult Fans of LEGO®.’ It refers to the community of adults who enjoy building with LEGO®, either recreationally or professionally. This community spans across the globe, connecting people through their shared love for these iconic bricks.

2. Why do adults like LEGO®?

LEGO® isn’t just a toy; it’s a creative medium that allows for endless expression and imagination. Many adults appreciate the therapeutic aspect of building with LEGO®, finding it a calming and satisfying activity. The nostalgia factor and complex sets that challenge problem-solving skills also contribute to LEGO®’s appeal among adults.

3. What is the largest LEGO® set for adults?

The largest LEGO® set for adults by piece count is the LEGO® Art World Map (31203) with 11,695 pieces. The second-largest is the LEGO® Star Wars Millennium Falcon (75192), with 7,541 pieces. However, new sets are continually released, so checking the LEGO® official website for updates is best.

4. How do I start collecting LEGO® as an adult?

Start by choosing a LEGO® set that aligns with your interests and skill level. Consider factors like budget, available display space, and complexity of the set. The AFOL community is an excellent resource for beginners, with numerous forums and social media groups where you can seek advice and share experiences.

5. What is LEGO® Ideas?

LEGO® Ideas is a platform that invites fans to submit their ideas for new LEGO® sets. Other fans can vote on these ideas, and if a project reaches 10,000 votes, it will be reviewed by LEGO® for a chance to become an official LEGO® set.

6. How can I preserve and clean my LEGO® sets?

To preserve your LEGO® sets, keep them out of direct sunlight, as prolonged exposure can cause colors to fade. Regular dusting can help maintain their appearance. If needed, LEGO® bricks can be cleaned with warm water and mild detergent, but be sure to let them dry completely before reassembling.

7. Are there any LEGO® sets that increase in value?

Yes, some LEGO® sets increase in value over time, particularly retired or limited edition sets. However, predicting which sets will appreciate can be difficult. Many AFOLs suggest buying sets you love and enjoy building rather than purely for investment purposes.

Conclusion

So there you have it – your guide to the endlessly vibrant world of LEGO® for adults. Whether it’s for the joy of creating, the satisfaction of problem-solving, or the warm glow of nostalgia, LEGO® sets hold an undeniable appeal for grown-ups everywhere. And in the realm of the AFOL community, this passion goes beyond the pleasure of building. It’s a shared experience, a mutual language, and a worldwide playground built brick by brick.

Your Next Step: MOCs and Belle-Ve Bricks

In your LEGO® journey, you might come across the term MOCs, which stands for ‘My Own Creations.’ These are custom builds that LEGO® fans design themselves, adding a whole new level of creativity and personalization to the LEGO® experience. Whether it’s a recreation of your childhood home, a model of your favorite fictional spaceship, or a fantastical creature from your imagination, MOCs allow you to take the LEGO® bricks off the instructions page and into a universe of your own making.

If you’re looking to take this step, consider exploring Belle-Ve Bricks, a platform renowned for custom MOCs. With their wide range of designs and step-by-step instructions, you’ll be designing and building your very own LEGO® creations in no time.

So, go forth, AFOLs! Embark on this colorful journey, embrace your creativity, and let the child within you run wild, one brick at a time. Because in the world of LEGO®, the only limit is the sky – or rather, the ceiling. Happy building!

<div class="badge-base LI-profile-badge" data-locale="en_US" data-size="large" data-theme="dark" data-type="HORIZONTAL" data-vanity="ferdi-vol" data-version="v1"><a class="badge-base__link LI-simple-link" href="https://www.linkedin.com/in/%E2%9C%85-ferdi-vol-corporate-gifts/?trk=profile-badge"></a></div>
/* Auto generated, hash = 5dceu9kevqjdyuy2uw1atqrsu */
//TODO: Break this file down so that we can actually unit test it.
(function(window) {
  /**
  * Renders all unrendred LinkedIn Badges on the page
  */
  window.LIRenderAll = function () {
    var CALLBACK_NAME     = 'LIBadgeCallback', //Must match callback on helpers.js
        BADGE_NAMES       = '.LI-profile-badge, .LI-entity-badge',
        // TODO -- tracking param for other badge types
        TRACKING_PARAM    = 'profile-badge',
        responsesReceived = 0, //Keeps track of number of responses recieved for proper cleanup when finished
        expectedResponses = 0, //Keeps track of number of responses to expect
        scripts           = [ ], //Keeps track of scripts added for proper cleanup when finished
        childScripts      = {}, //Keeps track of child scripts to render
        badges            = Array.prototype.slice.call(document.querySelectorAll(BADGE_NAMES));

    var i, len, badge, rendered;
    for (i = 0, len = badges.length;  i < len; i++) {
      badge    = badges[i];
      rendered =  badge.getAttribute('data-rendered');
      if (!rendered) {
        expectedResponses++;
        badge.setAttribute('data-rendered', true);
        renderBadge(badge);
      }
    }

    function isCNDomain() {
      if (typeof window !== "undefined") {
        var hostName = window.location && window.location.hostname ||  '';
        return (/linkedin(-ei)?.cn$/).test(hostName);
      }

      return false;
    }

    function generateUrl(isEI) {
      var domainPrefix = isEI ? 'https://badges.linkedin-ei' : 'https://badges.linkedin';
      if (isCNDomain()) {
        return domainPrefix + ".cn/";
      }

      return domainPrefix + ".com/";
    }

    function getBadgeKeyQueryParams(badge) {
      return Array.prototype.slice.call(badge.attributes).filter(function (attr) {
        return attr.name.lastIndexOf('data-key-', 0) !== -1;
      }).map(function (attr) {
        // Most browsers automatically lowercase the attribute name when its being read
        // We are calling lowercase on it again to ensure consistency for any browsers that are lagging behind.
        return encodeURIComponent(attr.name.replace('data-', '').toLowerCase()) + '=' + encodeURIComponent(attr.value);
      });
    }

    /*
    * Renders a single badge on the page
    * @param badge: div element of badge to render
    */
    function renderBadge(badge) {
      var size       = badge.getAttribute('data-size'),
          locale     = badge.getAttribute('data-locale'),
          type       = badge.getAttribute('data-type'),
          theme      = badge.getAttribute('data-theme'),
          vanity     = badge.getAttribute('data-vanity'),
          version    = badge.getAttribute('data-version'),
          isEI       = badge.hasAttribute('data-ei'),
          entity     = badge.getAttribute('data-entity'),
          isCreatePage = badge.hasAttribute('data-iscreate'),
          uid        = Math.round(1000000 * Math.random()),
          baseUrl = generateUrl(isEI),
          queryParams = [
            'locale=' + encodeURIComponent(locale),
            'badgetype=' + encodeURIComponent(type),
            'badgetheme=' + encodeURIComponent(theme),
            'uid=' + encodeURIComponent(uid),
            'version=' + encodeURIComponent(version)
          ],
          url;

      if (version === 'v2') {
        baseUrl += 'view';
        queryParams.push('badgesize=' + encodeURIComponent(size));
        queryParams.push('entity=' + encodeURIComponent(entity));
        queryParams = queryParams.concat(getBadgeKeyQueryParams(badge));
      } else {
        baseUrl += 'profile';
        queryParams.push('maxsize=' + encodeURIComponent(size));
        queryParams.push('trk=' + encodeURIComponent(TRACKING_PARAM));
        queryParams.push('vanityname=' + encodeURIComponent(vanity));
      }

      if (isCreatePage) {
        queryParams.push('fromCreate=true');
      }

      url = baseUrl + '?' + queryParams.join('&');
      badge.setAttribute('data-uid' , uid);
      jsonp(url); //Calls responseHandler when done
    }

    /**
    * Handles a response from the server. Finds badge matching badgeUid and inserts badgeHtml there
    * @param badgeHtml: String representing contents of the badge
    * @param badgeUid: UID of the badge to target
    **/
    function responseHandler(badgeHtml, badgeUid) {
      responsesReceived ++;

      var i, badge, uid, isCreate;
      var defaultWidth = 330 // max possible width
      var defaultHeight = 300 // max possible height

      for (i = 0, len = badges.length; i < len; i++) {
        badge = badges[i];
        // isCreate needed to prevent reloading artdeco script tag
        isCreate = badge.getAttribute('data-iscreate');
        uid   = parseInt(badge.getAttribute('data-uid'), 10);
        if (uid === badgeUid) {
          var badgeMarkup = `<body>${badgeHtml}</body>`
          var iframe = document.createElement('iframe');
          iframe.onload = function() {
            var iframeBody = iframe.contentWindow.document.body;
            // 5 px buffer to avoid the badge border being cut off.
            iframe.setAttribute('height', (iframeBody.scrollHeight || defaultHeight) + 5);
            iframe.setAttribute('width', (iframeBody.scrollWidth || defaultWidth) + 5);
          };
          iframe.setAttribute('frameBorder', '0');
          iframe.style.display = 'block';
          badge.appendChild(iframe);
          iframe.contentWindow.document.open();
          iframe.contentWindow.document.write(badgeMarkup);
          iframe.contentWindow.document.close();
          replaceScriptTags(badge, isCreate);
        }
      }
      tryClean();
    }

  // These functions are needed because badge markup is added via innerHtml property which does not run script tags
  function replaceScriptTags(node, isCreate) {
    if (shouldReplaceNode(node, isCreate)) {
      node.parentNode.replaceChild(cloneScriptNode(node), node);
      childScripts[node.src] = true;
    } else {
      var i = 0,
          children = node.childNodes;
      while (i < children.length) {
        replaceScriptTags(children[i++], isCreate);
      }
    }
    return node;
  }

  function shouldReplaceNode(node, isCreate) {
    return isScriptNode(node) && !childScripts[node.src] && (!isCreate || (isCreate && !node.getAttribute('data-isartdeco')));
  }

  function isScriptNode(node) {
    return node.tagName === 'SCRIPT';
  }

  function cloneScriptNode(node){
    var script  = document.createElement("script");
    for( var i = node.attributes.length-1; i >= 0; i-- ) {
      script.setAttribute( node.attributes[i].name, node.attributes[i].value );
    }
    return script;
  }

    // Gets all incoming responses
    window[CALLBACK_NAME] = responseHandler;

    /**
    * Tries to clean added tags
    **/
    function tryClean() {
      //Clean up after all requests are done..
      //Accounts for people including script more than once
      var done = (responsesReceived >= expectedResponses && expectedResponses > 0) || responsesReceived >= badges.length;
      if (done) {
        delete window[CALLBACK_NAME];

        // remove all script tags
        scripts.map(function(script){
          document.body.removeChild(script);
        });

      }
    }

    /*
    * Makes Jsonp request, responses handles by CALLBACK_NAME
    * @param url String: url of server to make request to
    */
    function jsonp(url) {
      var script = document.createElement('script');
      script.src = url;
      scripts.push(script);
      document.body.appendChild(script);
    }
  };

  if (document.readyState === 'complete') {
    window.LIRenderAll();
  } else {
    window.addEventListener('load', window.LIRenderAll, false);
  }

})(window);
Popular Posts