marty.net 1001 Postcards Love Love Love Meep Meep ZenZodiac DailyQuotation

YOU ARE HERE:
How do i remove Old Browser Pop up?

HOME

CPSHOP|

|

|

EMAIL MARTY
  marty.net message board
  « How do i remove Old Browser Pop up? »
Welcome, Guest. Please Login or Register.
12/13/17 at 09:04:08
Home Help Search Login Register
   marty.net message board
   About cpshop
   General cpshop Support
   How do i remove Old Browser Pop up?
(Moderator: Marty)
Pages: 1 Reply Notify of replies Send the topic Print 
   Author  Topic: How do i remove Old Browser Pop up?  (Read 1101 times)
tigaruk
Gold Dragon
****

Posts: 58



www.carboncloth ing.net
   

WWW E-Mail
How do i remove Old Browser Pop up?
« on: 12/18/13 at 15:16:11 »
Reply with quote Modify message

Running CPShop and at the top of my product pages is a nice big div saying
CafePress.com does not support your current browser.


Please update your browser to fully utilize the features of CafePress.com.

We recommend using the latest version of Google Chrome, Firefox, Safari, or Internet Explorer.



So how do i get rid of this? The offending code pieces are below but not sure what i can do in cpshop to disable them.



***;script src="//content.cafepress.com/js/oldBrowserPopup.js">
(function oldBrowserFunc(){
function create(htmlStr) {
var frag = document.createDocumentFragment(),
temp = document.createElement('div');
temp.innerHTML = htmlStr;
while (temp.firstChild) {
frag.appendChild(temp.firstChild);
}
return frag;
}
var fragment = create("***;div style='text-align: center; font-size: 14px; color: #333333; '>***;h3 style='font-size: 22px; line-height: 24px; color: #333333;'>CafePress.com does not support your current browser. ***;/h3>***;br /> Please update your browser to fully utilize the features of CafePress.com.***;br />***;br /> We recommend using the latest version of ***;a style='color:#79a618;' href='https://www.google.com/intl/en/chrome/browser/'>Google Chrome***;/a>, ***;a style='color:#79a618;' href='http://www.mozilla.org/en-US/firefox/new/'>Firefox***;/a>, ***;a style='color:#79a618;' href='http://www.apple.com/safari/'>Safari***;/a>, or ***;a style='color:#79a618;' href='http://windows.microsoft.com/en-us/internet-explorer/ie-10-worldwide-languages'>Internet Explorer***;/a>. ***;/div>");
document.body.insertBefore(fragment, document.body.firstChild);
Logged
tigaruk
Gold Dragon
****

Posts: 58



www.carboncloth ing.net
   

WWW E-Mail
Re: How do i remove Old Browser Pop up?
« Reply #1 on: 12/18/13 at 15:27:10 »
Reply with quote Modify message

Think i solved it with this after lots of guess work.

<style>
div[style='text-align: center; font-size: 14px; color: #333333; '] {
   display: none;
}  
</style>
Logged
tigaruk
Gold Dragon
****

Posts: 58



www.carboncloth ing.net
   

WWW E-Mail
Re: How do i remove Old Browser Pop up?
« Reply #2 on: 12/18/13 at 15:47:33 »
Reply with quote Modify message

Grrr works in everything except Internet Explorer! Any ideas?
Logged
flippinsweetgear
Gold Dragon
****

Posts: 171



Go Scots!
   

WWW
Re: How do i remove Old Browser Pop up?
« Reply #3 on: 12/18/13 at 19:38:59 »
Reply with quote Modify message

So far this workaround is working for me.  Let me know how it goes.

Step 1:

Make a backup of cppage.lib.

Step 2:

Find this line in cppage.lib:

my $response = $ua->get("http://$h$f");

and replace it with this:

my $response = $ua->get("http://$h$f",'User-Agent'=>'Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)');

3. Create a new blank file in your install directory called "cpcookies.txt" and chmod it to 755.

4. Test your store.
Logged

Flippin Sweet Gear | Kids T-shirts | Big Lebowski Shirts
tigaruk
Gold Dragon
****

Posts: 58



www.carboncloth ing.net
   

WWW E-Mail
Re: How do i remove Old Browser Pop up?
« Reply #4 on: 04/16/14 at 11:48:07 »
Reply with quote Modify message

Sorry, only just seen this reply.

Sadly it didn't fix the issue in IE.

Instead i added this to my cpshop.cgi.images file

*||||<script src="//content.cafepress.com/js/oldBrowserPopup.js"></script>||||<!--Java removed-->

Which has removed it.
Logged
Pages: 1 Reply Notify of replies Send the topic Print 
Jump to:


marty.net message board (http://www.marty.net/cgi/marty/board/messageboard)

Powered by YaBB 1 Gold - Release (Yet Another Bulletin Board)
Copyright 2000-2001, X-Null. All Rights Reserved.